From d063bc08424e2cc7a0dce4c03ff97589ca9536af Mon Sep 17 00:00:00 2001 From: Ben Ridley Date: Wed, 20 Jan 2021 10:03:16 +1100 Subject: [PATCH] Add correct scrape context to OS benchmark Signed-off-by: Ben Ridley --- collector/os_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) } }