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.4.8"
version = "0.4.9"
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>"]
readme = "README.md"
Expand Down
43 changes: 24 additions & 19 deletions redisbench_admin/utils/benchmark_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,25 +185,7 @@ def process_default_yaml_properties_file(
default_config = yaml.safe_load(stream)
default_specs = None
cluster_config = None
if "exporter" in default_config:
default_metrics = parse_exporter_metrics_definition(default_config["exporter"])
if len(default_metrics) > 0:
logging.info(
"Found RedisTimeSeries default metrics specification."
" Will include the following metrics on all benchmarks {}".format(
" ".join(default_metrics)
)
)
exporter_timemetric_path = parse_exporter_timemetric_definition(
default_config["exporter"]
)
if exporter_timemetric_path is not None:
logging.info(
"Found RedisTimeSeries default time metric specification."
" Will use the following JSON path to retrieve the test time {}".format(
exporter_timemetric_path
)
)
default_metrics, exporter_timemetric_path = extract_exporter_metrics(default_config)
if "kpis" in default_config:
logging.info(
"Loading default KPIs specifications from file: {}".format(
Expand Down Expand Up @@ -232,6 +214,29 @@ def process_default_yaml_properties_file(
)


def extract_exporter_metrics(default_config):
if "exporter" in default_config:
default_metrics = parse_exporter_metrics_definition(default_config["exporter"])
if len(default_metrics) > 0:
logging.info(
"Found RedisTimeSeries default metrics specification."
" Will include the following metrics on all benchmarks {}".format(
" ".join(default_metrics)
)
)
exporter_timemetric_path = parse_exporter_timemetric_definition(
default_config["exporter"]
)
if exporter_timemetric_path is not None:
logging.info(
"Found RedisTimeSeries default time metric specification."
" Will use the following JSON path to retrieve the test time {}".format(
exporter_timemetric_path
)
)
return default_metrics, exporter_timemetric_path


def extract_benchmark_tool_settings(benchmark_config):
benchmark_tool = None
benchmark_tool_source = None
Expand Down