Skip to content

Commit

Permalink
Fixed from_info_to_overall_shard_cpu() in case of None value (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
filipecosta90 authored Mar 14, 2022
1 parent 5228410 commit ba80720
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion redisbench_admin/run/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ def from_info_to_overall_shard_cpu(benchmark_cpu_stats):
total_cpu_usage = end_total_cpu - start_total_cpu
avg_cpu_pct = 100.0 * (total_cpu_usage / total_secs)
res[shard_n] = avg_cpu_pct
total_avg_cpu_pct += avg_cpu_pct
if avg_cpu_pct is not None:
total_avg_cpu_pct += avg_cpu_pct
return total_avg_cpu_pct, res


Expand Down

0 comments on commit ba80720

Please sign in to comment.