-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.go
90 lines (83 loc) · 1.99 KB
/
config.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
package main
import (
"time"
)
// Docker configuration
var (
endpoint = "unix:///var/run/docker.sock"
)
// Period configuration
const (
shortTestPeriod = 10 * time.Second
longTestPeriod = 50 * time.Second
)
// For container start benchmark
var containerOpConfig = map[string]interface{}{
"qps": []float64{
1.0,
2.0,
4.0,
8.0,
16.0,
32.0,
64.0,
},
"routine": 100,
"period": longTestPeriod,
}
// For varies interval benchmark
var variesIntervalConfig = map[string]interface{}{
"list interval": []time.Duration{
0 * time.Second,
50 * time.Millisecond,
100 * time.Millisecond,
200 * time.Millisecond,
500 * time.Millisecond,
1 * time.Second,
2 * time.Second,
5 * time.Second,
},
"inspect interval": []time.Duration{
0 * time.Second,
1 * time.Millisecond, // 1000 inspect/second = 100 pods * 10 containers
2 * time.Millisecond, // 500 inspect/second = 100 pods * 5 containers = 50 pods * 10 containers
5 * time.Millisecond, // 200 inspect/second = 100 pods * 2 containers = 20 pods * 10 containers
10 * time.Millisecond, // 100 inspect/second = 100 pods * 1 containers = 10 pods * 10 containers
50 * time.Millisecond, // 20 inspect/second = 20 pods * 1 containers = 10 pods * 2 containers
100 * time.Millisecond, // 10 insepct/second = 10 pods * 1 containers = 5 pods * 2 containers
},
"list period": longTestPeriod,
"inspect period": shortTestPeriod,
}
// For varies container number benchmark
var variesContainerNumConfig = map[string]interface{}{
// aliveContainers * 3
"dead": []int{
60,
120,
300,
600,
},
"alive": []int{
20, // 10 * 2
40, // 20 * 2
100, // 50 * 2
200, // 100 * 2
},
"interval": 200 * time.Millisecond,
"period": shortTestPeriod,
}
// For varies routine number benchmark
var variesRoutineNumConfig = map[string]interface{}{
"list interval": 1 * time.Second,
"inspect interval": 500 * time.Millisecond, // 2 containers/pod
"routines": []int{
1,
5,
10,
20,
50,
100,
},
"period": shortTestPeriod,
}