-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlist_test.go
52 lines (42 loc) · 1022 Bytes
/
list_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//go:build windows
// +build windows
package winproc_test
import (
"testing"
"github.com/gentlemanautomaton/winproc"
)
func BenchmarkList(b *testing.B) {
for n := 0; n < b.N; n++ {
winproc.List()
}
}
func BenchmarkListWithCommands(b *testing.B) {
for n := 0; n < b.N; n++ {
winproc.List(winproc.CollectCommands)
}
}
func BenchmarkListWithSessions(b *testing.B) {
for n := 0; n < b.N; n++ {
winproc.List(winproc.CollectSessions)
}
}
func BenchmarkListWithUsers(b *testing.B) {
for n := 0; n < b.N; n++ {
winproc.List(winproc.CollectUsers)
}
}
func BenchmarkListWithTimes(b *testing.B) {
for n := 0; n < b.N; n++ {
winproc.List(winproc.CollectTimes)
}
}
func BenchmarkListWithCriticality(b *testing.B) {
for n := 0; n < b.N; n++ {
winproc.List(winproc.CollectCriticality)
}
}
func BenchmarkListWithAll(b *testing.B) {
for n := 0; n < b.N; n++ {
winproc.List(winproc.CollectCommands, winproc.CollectSessions, winproc.CollectUsers, winproc.CollectTimes, winproc.CollectCriticality)
}
}