mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-09 20:16:35 +00:00
chore: Move private packages to internal (#1664)
This commit is contained in:
19
internal/collector/net/net_bench_test.go
Normal file
19
internal/collector/net/net_bench_test.go
Normal file
@@ -0,0 +1,19 @@
|
||||
//go:build windows
|
||||
|
||||
package net_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/alecthomas/kingpin/v2"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/net"
|
||||
"github.com/prometheus-community/windows_exporter/internal/testutils"
|
||||
)
|
||||
|
||||
func BenchmarkCollector(b *testing.B) {
|
||||
// PrinterInclude is not set in testing context (kingpin flags not parsed), causing the collector to skip all interfaces.
|
||||
localNicInclude := ".+"
|
||||
|
||||
kingpin.CommandLine.GetArg("collector.net.nic-include").StringVar(&localNicInclude)
|
||||
testutils.FuncBenchmarkCollector(b, net.Name, net.NewWithFlags)
|
||||
}
|
||||
Reference in New Issue
Block a user