1
0
mirror of https://github.com/prometheus-community/windows_exporter.git synced 2025-08-08 12:02:09 +03:00

memory: fix panics if metrics does not exists (#1960)

Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
Jan-Otto Kröpke
2025-04-04 23:21:26 +02:00
committed by GitHub
parent 88c929ac6f
commit ecc805f0fa
39 changed files with 565 additions and 364 deletions

View File

@@ -47,7 +47,7 @@ func FuncBenchmarkCollector[C collector.Collector](b *testing.B, name string, co
}
collectors := collector.New(map[string]collector.Collector{name: c})
require.NoError(b, collectors.Build(logger))
require.NoError(b, collectors.Build(b.Context(), logger))
metrics := make(chan prometheus.Metric)