Don't print critical path parallelism ratio if elapsed time is 0.
Test: m nothing, examine out/soong.log Change-Id: Ib23902c703d306337b2a5150d6d63b1e3d0f95b3
This commit is contained in:
parent
6e3b471d3d
commit
68534a29d6
|
@ -112,9 +112,11 @@ func (cp *criticalPath) Flush() {
|
||||||
if !cp.start.IsZero() {
|
if !cp.start.IsZero() {
|
||||||
elapsedTime := cp.end.Sub(cp.start).Round(time.Second)
|
elapsedTime := cp.end.Sub(cp.start).Round(time.Second)
|
||||||
cp.log.Verbosef("elapsed time %s", elapsedTime.String())
|
cp.log.Verbosef("elapsed time %s", elapsedTime.String())
|
||||||
|
if elapsedTime > 0 {
|
||||||
cp.log.Verbosef("perfect parallelism ratio %d%%",
|
cp.log.Verbosef("perfect parallelism ratio %d%%",
|
||||||
int(float64(criticalTime)/float64(elapsedTime)*100))
|
int(float64(criticalTime)/float64(elapsedTime)*100))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
cp.log.Verbose("critical path:")
|
cp.log.Verbose("critical path:")
|
||||||
for i := len(criticalPath) - 1; i >= 0; i-- {
|
for i := len(criticalPath) - 1; i >= 0; i-- {
|
||||||
duration := criticalPath[i].duration
|
duration := criticalPath[i].duration
|
||||||
|
|
Loading…
Reference in New Issue