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.5.24"
version = "0.5.25"
description = "Redis benchmark run helper. A wrapper around Redis and Redis Modules benchmark tools ( ftsb_redisearch, memtier_benchmark, redis-benchmark, aibench, etc... )."
authors = ["filipecosta90 <filipecosta.90@gmail.com>","Redis Performance Group <performance@redis.com>"]
readme = "README.md"
Expand Down
9 changes: 9 additions & 0 deletions redisbench_admin/run/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,15 @@ def common_exporter_logic(
datapoints_timestamp = parse_exporter_timemetric(
exporter_timemetric_path, results_dict
)
if datapoints_timestamp is None:
datapoints_timestamp = int(
datetime.datetime.now(datetime.timezone.utc).timestamp() * 1000.0
)
logging.warning(
"Error while trying to parse datapoints timestamp. Using current system timestamp Error: {}".format(
datapoints_timestamp
)
)
if (
artifact_version is not None
and artifact_version != ""
Expand Down
24 changes: 20 additions & 4 deletions redisbench_admin/run/ycsb/ycsb.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,22 @@ def prepare_ycsb_benchmark_command(
workload = None
threads = None
override_workload_properties = []
for k in benchmark_config["parameters"]:
if type(benchmark_config["parameters"]) == list:
for k in benchmark_config["parameters"]:
if "database" in k:
database = k["database"]
if "step" in k:
step = k["step"]
if "workload" in k:
workload = k["workload"]
if current_workdir is not None and workload.startswith("./"):
workload = "{}{}".format(current_workdir, workload[1:])
if "threads" in k:
threads = k["threads"]
if "override_workload_properties" in k:
override_workload_properties = k["override_workload_properties"]
if type(benchmark_config["parameters"]) == dict:
k = benchmark_config["parameters"]
if "database" in k:
database = k["database"]
if "step" in k:
Expand All @@ -47,9 +62,10 @@ def prepare_ycsb_benchmark_command(
if threads:
command_arr.extend(["-p", '"threadcount={}"'.format(threads)])

command_arr.extend(["-p", '"redis.host={}"'.format(server_private_ip)])

command_arr.extend(["-p", '"redis.port={}"'.format(server_plaintext_port)])
if server_private_ip is not None:
command_arr.extend(["-p", '"redis.host={}"'.format(server_private_ip)])
if server_plaintext_port is not None:
command_arr.extend(["-p", '"redis.port={}"'.format(server_plaintext_port)])

for prop in override_workload_properties:
for k, v in prop.items():
Expand Down
8 changes: 7 additions & 1 deletion redisbench_admin/run_remote/run_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,13 @@ def run_remote_command_logic(args, project_name, project_version):
setup_name,
test_name,
)

except KeyboardInterrupt:
logging.critical(
"Detected Keyboard interruput...Destroy all remote envs and exiting right away!"
)
if args.inventory is None:
terraform_destroy(remote_envs)
exit(1)
except:
(
start_time,
Expand Down
4 changes: 3 additions & 1 deletion redisbench_admin/utils/benchmark_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ def parse_exporter_timemetric(metric_path: str, results_dict: dict):
datapoints_timestamp = None
try:
jsonpath_expr = parse(metric_path)
datapoints_timestamp = int(jsonpath_expr.find(results_dict)[0].value)
find_res = jsonpath_expr.find(results_dict)
if len(find_res) > 0:
datapoints_timestamp = int(find_res[0].value)
except Exception as e:
logging.error(
"Unable to parse time-metric {}. Error: {}".format(metric_path, e.__str__())
Expand Down
1 change: 0 additions & 1 deletion redisbench_admin/utils/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,6 @@ def fetch_remote_setup_from_config(


def push_data_to_redistimeseries(rts, time_series_dict: dict):
logging.info(time_series_dict)
datapoint_errors = 0
datapoint_inserts = 0
if rts is not None and time_series_dict is not None:
Expand Down