Skip to content

Commit 8424b62

Browse files
Fixed CPU % calculation of fast benchmarks (#326)
1 parent 3f2aa88 commit 8424b62

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "redisbench-admin"
3-
version = "0.7.20"
3+
version = "0.7.21"
44
description = "Redis benchmark run helper. A wrapper around Redis and Redis Modules benchmark tools ( ftsb_redisearch, memtier_benchmark, redis-benchmark, aibench, etc... )."
55
authors = ["filipecosta90 <[email protected]>","Redis Performance Group <[email protected]>"]
66
readme = "README.md"

redisbench_admin/run/metrics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ def from_info_to_overall_shard_cpu(benchmark_cpu_stats):
147147
)
148148
if avg_cpu_pct is not None:
149149
shards_cpu_arr.append(avg_cpu_pct)
150-
151-
avg_cpu_pct = np.percentile(shards_cpu_arr, 75)
150+
if len(shards_cpu_arr) > 0:
151+
avg_cpu_pct = np.percentile(shards_cpu_arr, 75)
152152

153153
res[shard_n] = avg_cpu_pct
154154
if avg_cpu_pct is not None:

0 commit comments

Comments
 (0)