Don't print critical path parallelism ratio if elapsed time is 0. am: 68534a29d6 am: 94a83cfae1

Change-Id: I859cf47382508f3749695723db3d35ff6427e8a2
This commit is contained in:
Automerger Merge Worker 2020-01-04 10:20:44 +00:00
commit 40ceccdaa5

View file

@ -112,8 +112,10 @@ func (cp *criticalPath) Flush() {
if !cp.start.IsZero() {
elapsedTime := cp.end.Sub(cp.start).Round(time.Second)
cp.log.Verbosef("elapsed time %s", elapsedTime.String())
cp.log.Verbosef("perfect parallelism ratio %d%%",
int(float64(criticalTime)/float64(elapsedTime)*100))
if elapsedTime > 0 {
cp.log.Verbosef("perfect parallelism ratio %d%%",
int(float64(criticalTime)/float64(elapsedTime)*100))
}
}
cp.log.Verbose("critical path:")
for i := len(criticalPath) - 1; i >= 0; i-- {