mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-04 17:46:36 +00:00
chore: Move private packages to internal (#1664)
This commit is contained in:
17
internal/collector/process/process_test.go
Normal file
17
internal/collector/process/process_test.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package process_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/alecthomas/kingpin/v2"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/process"
|
||||
"github.com/prometheus-community/windows_exporter/internal/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)
|
||||
}
|
||||
Reference in New Issue
Block a user