should use time.Since instead of time.Now().Sub

This commit is contained in:
Wang Guoliang
2018-02-11 21:17:00 +08:00
committed by Guoliang Wang
parent a5c3c8d16c
commit 89669283fe
25 changed files with 39 additions and 38 deletions

View File

@@ -274,7 +274,7 @@ func runDensityTest(dtc DensityTestConfig, testPhaseDurations *timer.TestPhaseTi
logStopCh := make(chan struct{})
go logPodStartupStatus(dtc.ClientSets[0], dtc.PodCount, map[string]string{"type": "densityPod"}, dtc.PollInterval, logStopCh)
wg.Wait()
startupTime := time.Now().Sub(startTime)
startupTime := time.Since(startTime)
close(logStopCh)
framework.Logf("E2E startup time for %d pods: %v", dtc.PodCount, startupTime)
framework.Logf("Throughput (pods/s) during cluster saturation phase: %v", float32(dtc.PodCount)/float32(startupTime/time.Second))