mirror of https://github.com/shirou/gopsutil
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
286 B
Go
19 lines
286 B
Go
4 years ago
|
// +build linux
|
||
|
|
||
|
package net
|
||
|
|
||
|
import "testing"
|
||
|
|
||
|
func BenchmarkGetConnectionsInet(b *testing.B) {
|
||
|
b.ResetTimer()
|
||
|
for i := 0; i < b.N; i++ {
|
||
|
Connections("inet")
|
||
|
}
|
||
|
}
|
||
|
func BenchmarkGetConnectionsAll(b *testing.B) {
|
||
|
b.ResetTimer()
|
||
|
for i := 0; i < b.N; i++ {
|
||
|
Connections("all")
|
||
|
}
|
||
|
}
|