mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-28 13:48:49 +08:00
19 lines
286 B
Go
19 lines
286 B
Go
![]() |
// +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")
|
||
|
}
|
||
|
}
|