From f3419dd6e0e5183c7871a4072257d32dbdbdbfa3 Mon Sep 17 00:00:00 2001 From: fcostaoliveira Date: Sun, 27 Apr 2025 04:15:37 +0100 Subject: [PATCH] fix: update pandas Series float conversion to address deprecation warnings - Update comparison_df.median() and std() calls to use .iloc[0] - Bump version from 0.11.36 to 0.11.37 --- pyproject.toml | 2 +- redisbench_admin/compare/args.py | 1 + redisbench_admin/compare/compare.py | 21 +++++++++------------ redisbench_admin/utils/remote.py | 9 +++++++++ 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 19eb630..d99f34f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "redisbench-admin" -version = "0.11.35" +version = "0.11.37" description = "Redis benchmark run helper. A wrapper around Redis and Redis Modules benchmark tools ( ftsb_redisearch, memtier_benchmark, redis-benchmark, aibench, etc... )." authors = ["filipecosta90 ","Redis Performance Group "] readme = "README.md" diff --git a/redisbench_admin/compare/args.py b/redisbench_admin/compare/args.py index 5aba32c..6b03bcb 100644 --- a/redisbench_admin/compare/args.py +++ b/redisbench_admin/compare/args.py @@ -131,6 +131,7 @@ def create_compare_arguments(parser): parser.add_argument("--simple-table", type=bool, default=False) parser.add_argument("--use_metric_context_path", type=bool, default=False) parser.add_argument("--testname_regex", type=str, default=".*", required=False) + parser.add_argument("--test-regex", type=str, default=".*", required=False) parser.add_argument( "--regressions-percent-lower-limit", type=float, diff --git a/redisbench_admin/compare/compare.py b/redisbench_admin/compare/compare.py index e489f9a..f256572 100644 --- a/redisbench_admin/compare/compare.py +++ b/redisbench_admin/compare/compare.py @@ -315,25 +315,22 @@ def compare_command_logic(args, project_name, project_version): comparison_summary = "In summary:\n" if total_stable > 0: comparison_summary += ( - "- Detected a total of {} stable tests between versions.\n".format( - total_stable, - ) + f"- Detected a total of {total_stable} stable tests between versions.\n" ) if total_unstable > 0: comparison_summary += ( - "- Detected a total of {} highly unstable benchmarks.\n".format( - total_unstable - ) + f"- Detected a total of {total_unstable} highly unstable benchmarks.\n" ) if total_improvements > 0: - comparison_summary += "- Detected a total of {} improvements above the improvement water line.\n".format( - total_improvements + comparison_summary += ( + f"- Detected a total of {total_improvements} improvements above the improvement water line.\n" ) if total_regressions > 0: - comparison_summary += "- Detected a total of {} regressions bellow the regression water line {}.\n".format( - total_regressions, args.regressions_percent_lower_limit + comparison_summary += ( + f"- Detected a total of {total_regressions} regressions bellow the regression water line {args.regressions_percent_lower_limit}%.\n" ) + comparison_summary += "\n" comment_body += comparison_summary comment_body += "\n" @@ -1102,9 +1099,9 @@ def get_v_pct_change_and_largest_var( comparison_values.append(tuple[1]) comparison_df = pd.DataFrame(comparison_values) - comparison_median = float(comparison_df.median()) + comparison_median = float(comparison_df.median().iloc[0]) comparison_v = comparison_median - comparison_std = float(comparison_df.std()) + comparison_std = float(comparison_df.std().iloc[0]) if verbose: logging.info( "comparison_datapoints: {} value: {}; std-dev: {}; median: {}".format( diff --git a/redisbench_admin/utils/remote.py b/redisbench_admin/utils/remote.py index df415c0..7f227e9 100644 --- a/redisbench_admin/utils/remote.py +++ b/redisbench_admin/utils/remote.py @@ -629,6 +629,15 @@ def push_data_to_redistimeseries(rts, time_series_dict: dict, expire_msecs=0): ) for timeseries_name, time_series in time_series_dict.items(): try: + arch = "x86_64" + if "arch" in time_series["labels"]: + arch = time_series["labels"]["arch"] + if arch == "aarch64" and "aarch64" not in timeseries_name: + original_timeseries_name = timeseries_name + timeseries_name = f"{timeseries_name}/arch/{arch}" + logging.warning( + f"overriding key named {original_timeseries_name} given it does not contain arch and it's not x86_64. new key={timeseries_name}" + ) exporter_create_ts(rts, time_series, timeseries_name) for timestamp, value in time_series["data"].items(): try: