Add correct scrape context to OS benchmark

Signed-off-by: Ben Ridley <benridley29@gmail.com>
This commit is contained in:
Ben Ridley 2021-01-20 10:03:16 +11:00
parent dd473c4807
commit d063bc0842
1 changed files with 2 additions and 1 deletions

View File

@ -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)
}
}