mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-22 21:08:51 +00:00
cpustate: fixing division by zero
total running time (in parallel stats) is zero when all cores on a cluster are hotplugged. this caused a division by zero when calculating percentage.
This commit is contained in:
parent
179baf030e
commit
ab76aa73f2
@ -330,7 +330,10 @@ class ParallelStats(object):
|
|||||||
if not self.use_ratios:
|
if not self.use_ratios:
|
||||||
time_pc *= 100
|
time_pc *= 100
|
||||||
if n:
|
if n:
|
||||||
|
if running_time:
|
||||||
running_time_pc = time / running_time
|
running_time_pc = time / running_time
|
||||||
|
else:
|
||||||
|
running_time_pc = 0
|
||||||
if not self.use_ratios:
|
if not self.use_ratios:
|
||||||
running_time_pc *= 100
|
running_time_pc *= 100
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user