mirror of
https://github.com/prometheus-community/windows_exporter
synced 2025-01-26 09:13:51 +00:00
17 lines
560 B
Go
17 lines
560 B
Go
package printer_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/alecthomas/kingpin/v2"
|
|
"github.com/prometheus-community/windows_exporter/pkg/collector/printer"
|
|
"github.com/prometheus-community/windows_exporter/pkg/testutils"
|
|
)
|
|
|
|
func BenchmarkCollector(b *testing.B) {
|
|
// Whitelist is not set in testing context (kingpin flags not parsed), causing the collector to skip all printers.
|
|
printersInclude := ".+"
|
|
kingpin.CommandLine.GetArg("collector.printer.include").StringVar(&printersInclude)
|
|
testutils.FuncBenchmarkCollector(b, "printer", printer.NewWithFlags)
|
|
}
|