Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "redisbench-admin"
version = "0.11.52"
version = "0.11.53"
description = "Redis benchmark run helper. A wrapper around Redis and Redis Modules benchmark tools ( ftsb_redisearch, memtier_benchmark, redis-benchmark, aibench, etc... )."
authors = ["filipecosta90 <[email protected]>","Redis Performance Group <[email protected]>"]
readme = "README.md"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ def extract_aibench_extra_links(benchmark_config, benchmark_tool):
)
queries_file_link = None
for entry in benchmark_config["clientconfig"]:
if "parameters" in entry:
# Handle both dict and non-dict entries in the list
if isinstance(entry, dict) and "parameters" in entry:
for parameter in entry["parameters"]:
if "file" in parameter:
queries_file_link = parameter["file"]
Expand Down
29 changes: 23 additions & 6 deletions redisbench_admin/run/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,9 +404,17 @@ def get_start_time_vars(start_time=None):
def check_dbconfig_tool_requirement(benchmark_config, dbconfig_keyname="dbconfig"):
required = False
if dbconfig_keyname in benchmark_config:
for k in benchmark_config[dbconfig_keyname]:
if "tool" in k:
dbconfig = benchmark_config[dbconfig_keyname]
# Handle both dict and list formats
if isinstance(dbconfig, dict):
# New format: dbconfig is a dict
if "tool" in dbconfig:
required = True
elif isinstance(dbconfig, list):
# Old format: dbconfig is a list of dicts
for k in dbconfig:
if isinstance(k, dict) and "tool" in k:
required = True
return required


Expand All @@ -418,7 +426,8 @@ def check_dbconfig_keyspacelen_requirement(
if dbconfig_keyname in benchmark_config:
if type(benchmark_config[dbconfig_keyname]) == list:
for k in benchmark_config[dbconfig_keyname]:
if "check" in k:
# Handle both dict and non-dict entries in the list
if isinstance(k, dict) and "check" in k:
if "keyspacelen" in k["check"]:
required = True
keyspacelen = int(k["check"]["keyspacelen"])
Expand All @@ -436,9 +445,17 @@ def execute_init_commands(benchmark_config, r, dbconfig_keyname="dbconfig"):
cmds = None
res = 0
if dbconfig_keyname in benchmark_config:
for k in benchmark_config[dbconfig_keyname]:
if "init_commands" in k:
cmds = k["init_commands"]
dbconfig = benchmark_config[dbconfig_keyname]
# Handle both dict and list formats
if isinstance(dbconfig, dict):
# New format: dbconfig is a dict
if "init_commands" in dbconfig:
cmds = dbconfig["init_commands"]
elif isinstance(dbconfig, list):
# Old format: dbconfig is a list of dicts
for k in dbconfig:
if isinstance(k, dict) and "init_commands" in k:
cmds = k["init_commands"]
if cmds is not None:
for cmd in cmds:
is_array = False
Expand Down
3 changes: 2 additions & 1 deletion redisbench_admin/run/ftsb/ftsb.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def extract_ftsb_extra_links(
)
queries_file_link = None
for entry in benchmark_config[config_key]:
if "parameters" in entry:
# Handle both dict and non-dict entries in the list
if isinstance(entry, dict) and "parameters" in entry:
for parameter in entry["parameters"]:
if "input" in parameter:
queries_file_link = parameter["input"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ def extract_remote_tool_extra_links(
)
queries_file_link = None
for entry in benchmark_config[config_key]:
if "parameters" in entry:
# Handle both dict and non-dict entries in the list
if isinstance(entry, dict) and "parameters" in entry:
for parameter in entry["parameters"]:
if "file" in parameter:
queries_file_link = parameter["file"]
Expand Down
Loading