diff --git a/test/integration/scheduler_perf/scheduler_test.go b/test/integration/scheduler_perf/scheduler_test.go index b7134d6953d..c6ecc2e751c 100644 --- a/test/integration/scheduler_perf/scheduler_test.go +++ b/test/integration/scheduler_perf/scheduler_test.go @@ -162,8 +162,12 @@ func schedulePods(config *testConfig) int32 { // return the worst-case-scenario interval that was seen during this time. // Note this should never be low due to cold-start, so allow bake in sched time if necessary. if len(scheduled) >= config.numPods { + consumed := int(time.Since(start) / time.Second) + if consumed <= 0 { + consumed = 1 + } fmt.Printf("Scheduled %v Pods in %v seconds (%v per second on average). min QPS was %v\n", - config.numPods, int(time.Since(start)/time.Second), config.numPods/int(time.Since(start)/time.Second), minQps) + config.numPods, consumed, config.numPods/consumed, minQps) return minQps }