mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-06-08 16:30:57 -04:00
scheduler: update tests to use sub-benchmarks (pkg/scheduler/cache)
This commit is contained in:
parent
2aced6d9e4
commit
d7e12ce453
1 changed files with 12 additions and 10 deletions
22
pkg/scheduler/cache/cache_test.go
vendored
22
pkg/scheduler/cache/cache_test.go
vendored
|
|
@ -1069,16 +1069,18 @@ func BenchmarkUpdate1kNodes30kPods(b *testing.B) {
|
|||
}
|
||||
}
|
||||
|
||||
func BenchmarkExpire100Pods(b *testing.B) {
|
||||
benchmarkExpire(b, 100)
|
||||
}
|
||||
|
||||
func BenchmarkExpire1kPods(b *testing.B) {
|
||||
benchmarkExpire(b, 1000)
|
||||
}
|
||||
|
||||
func BenchmarkExpire10kPods(b *testing.B) {
|
||||
benchmarkExpire(b, 10000)
|
||||
func BenchmarkExpirePods(b *testing.B) {
|
||||
podNums := []int{
|
||||
100,
|
||||
1000,
|
||||
10000,
|
||||
}
|
||||
for _, podNum := range podNums {
|
||||
name := fmt.Sprintf("%dPods", podNum)
|
||||
b.Run(name, func(b *testing.B) {
|
||||
benchmarkExpire(b, podNum)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func benchmarkExpire(b *testing.B, podNum int) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue