mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2025-04-18 19:24:05 +03:00
18 lines
640 B
Go
18 lines
640 B
Go
package process_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/alecthomas/kingpin/v2"
|
|
"github.com/prometheus-community/windows_exporter/pkg/collector/process"
|
|
"github.com/prometheus-community/windows_exporter/pkg/testutils"
|
|
)
|
|
|
|
func BenchmarkProcessCollector(b *testing.B) {
|
|
// PrinterInclude is not set in testing context (kingpin flags not parsed), causing the collector to skip all processes.
|
|
localProcessInclude := ".+"
|
|
kingpin.CommandLine.GetArg("collector.process.include").StringVar(&localProcessInclude)
|
|
// No context name required as collector source is WMI
|
|
testutils.FuncBenchmarkCollector(b, process.Name, process.NewWithFlags)
|
|
}
|