shirou_gopsutil/net/net_linux_netlink_test.go

21 lines
304 B
Go
Raw Normal View History

2021-12-23 05:54:41 +08:00
//go:build linux
// +build linux
package net
import "testing"
func BenchmarkGetConnectionsInet(b *testing.B) {
b.ResetTimer()
for i := 0; i < b.N; i++ {
Connections("inet")
}
}
2021-12-23 05:54:41 +08:00
func BenchmarkGetConnectionsAll(b *testing.B) {
b.ResetTimer()
for i := 0; i < b.N; i++ {
Connections("all")
}
}