mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-20 20:09:11 +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:
|
||||
time_pc *= 100
|
||||
if n:
|
||||
running_time_pc = time / running_time
|
||||
if running_time:
|
||||
running_time_pc = time / running_time
|
||||
else:
|
||||
running_time_pc = 0
|
||||
if not self.use_ratios:
|
||||
running_time_pc *= 100
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user