Skip to content

Commit ba80720

Browse files
Fixed from_info_to_overall_shard_cpu() in case of None value (#315)
1 parent 5228410 commit ba80720

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

redisbench_admin/run/metrics.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ def from_info_to_overall_shard_cpu(benchmark_cpu_stats):
147147
total_cpu_usage = end_total_cpu - start_total_cpu
148148
avg_cpu_pct = 100.0 * (total_cpu_usage / total_secs)
149149
res[shard_n] = avg_cpu_pct
150-
total_avg_cpu_pct += avg_cpu_pct
150+
if avg_cpu_pct is not None:
151+
total_avg_cpu_pct += avg_cpu_pct
151152
return total_avg_cpu_pct, res
152153

153154

0 commit comments

Comments
 (0)