Skip to content

Commit 817327e

Browse files
[fix] fixed property_group len calculation based on type within merge_default_and_specific_properties_dict_type (#170)
1 parent 606d591 commit 817327e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
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.3.9"
3+
version = "0.3.10"
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]>"]
66
readme = "README.md"

redisbench_admin/utils/benchmark_config.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,15 @@ def merge_default_and_specific_properties_dict_type(
117117
):
118118
if propertygroup_keyname not in benchmark_config:
119119
benchmark_config[propertygroup_keyname] = default_properties
120+
pg_len = 0
121+
if type(benchmark_config[propertygroup_keyname]) == list:
122+
pg_len = len(benchmark_config[propertygroup_keyname])
123+
elif type(benchmark_config[propertygroup_keyname]) == dict:
124+
pg_len = len(benchmark_config[propertygroup_keyname].keys())
120125
logging.info(
121126
"Using exclusively default '{}' properties (total={}) given the file {} had no '{}' property group".format(
122127
propertygroup_keyname,
123-
len(benchmark_config[propertygroup_keyname].keys()),
128+
pg_len,
124129
usecase_filename,
125130
propertygroup_keyname,
126131
)

0 commit comments

Comments
 (0)