diff --git a/collector/os_test.go b/collector/os_test.go index 2e669486..1b6b7d9d 100644 --- a/collector/os_test.go +++ b/collector/os_test.go @@ -17,7 +17,8 @@ func BenchmarkOsCollect(b *testing.B) { <-metrics } }() + s, err := PrepareScrapeContext([]string{"os"}) for i := 0; i < b.N; i++ { - o.Collect(&ScrapeContext{}, metrics) + o.Collect(s, metrics) } }