mirror of https://github.com/k3s-io/k3s
scheduler: update tests to use sub-benchmarks (pkg/scheduler/cache)
parent
2aced6d9e4
commit
d7e12ce453
|
@ -1069,16 +1069,18 @@ func BenchmarkUpdate1kNodes30kPods(b *testing.B) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func BenchmarkExpire100Pods(b *testing.B) {
|
func BenchmarkExpirePods(b *testing.B) {
|
||||||
benchmarkExpire(b, 100)
|
podNums := []int{
|
||||||
|
100,
|
||||||
|
1000,
|
||||||
|
10000,
|
||||||
}
|
}
|
||||||
|
for _, podNum := range podNums {
|
||||||
func BenchmarkExpire1kPods(b *testing.B) {
|
name := fmt.Sprintf("%dPods", podNum)
|
||||||
benchmarkExpire(b, 1000)
|
b.Run(name, func(b *testing.B) {
|
||||||
|
benchmarkExpire(b, podNum)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func BenchmarkExpire10kPods(b *testing.B) {
|
|
||||||
benchmarkExpire(b, 10000)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func benchmarkExpire(b *testing.B, podNum int) {
|
func benchmarkExpire(b *testing.B, podNum int) {
|
||||||
|
|
Loading…
Reference in New Issue