mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-08 14:06:38 +00:00
Add correct scrape context to OS benchmark
Signed-off-by: Ben Ridley <benridley29@gmail.com>
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user