Commit d7e12ce4 authored by Yang Li's avatar Yang Li

scheduler: update tests to use sub-benchmarks (pkg/scheduler/cache)

parent 2aced6d9
...@@ -1069,16 +1069,18 @@ func BenchmarkUpdate1kNodes30kPods(b *testing.B) { ...@@ -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,
func BenchmarkExpire1kPods(b *testing.B) { 10000,
benchmarkExpire(b, 1000) }
} for _, podNum := range podNums {
name := fmt.Sprintf("%dPods", podNum)
func BenchmarkExpire10kPods(b *testing.B) { b.Run(name, func(b *testing.B) {
benchmarkExpire(b, 10000) benchmarkExpire(b, podNum)
})
}
} }
func benchmarkExpire(b *testing.B, podNum int) { func benchmarkExpire(b *testing.B, podNum int) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment