mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-07-23 07:19:58 +01: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:
@@ -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:
|
||||||
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:
|
if not self.use_ratios:
|
||||||
running_time_pc *= 100
|
running_time_pc *= 100
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user