Skip to content

Commit 298ee82

Browse files
fix: update pandas Series float conversion to address deprecation warnings (#450)
- Update comparison_df.median() and std() calls to use .iloc[0] - Bump version from 0.11.36 to 0.11.37 Co-authored-by: fcostaoliveira <[email protected]>
1 parent 7406517 commit 298ee82

File tree

3 files changed

+19
-12
lines changed

3 files changed

+19
-12
lines changed

redisbench_admin/compare/args.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ def create_compare_arguments(parser):
131131
parser.add_argument("--simple-table", type=bool, default=False)
132132
parser.add_argument("--use_metric_context_path", type=bool, default=False)
133133
parser.add_argument("--testname_regex", type=str, default=".*", required=False)
134+
parser.add_argument("--test-regex", type=str, default=".*", required=False)
134135
parser.add_argument(
135136
"--regressions-percent-lower-limit",
136137
type=float,

redisbench_admin/compare/compare.py

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -315,25 +315,22 @@ def compare_command_logic(args, project_name, project_version):
315315
comparison_summary = "In summary:\n"
316316
if total_stable > 0:
317317
comparison_summary += (
318-
"- Detected a total of {} stable tests between versions.\n".format(
319-
total_stable,
320-
)
318+
f"- Detected a total of {total_stable} stable tests between versions.\n"
321319
)
322320

323321
if total_unstable > 0:
324322
comparison_summary += (
325-
"- Detected a total of {} highly unstable benchmarks.\n".format(
326-
total_unstable
327-
)
323+
f"- Detected a total of {total_unstable} highly unstable benchmarks.\n"
328324
)
329325
if total_improvements > 0:
330-
comparison_summary += "- Detected a total of {} improvements above the improvement water line.\n".format(
331-
total_improvements
326+
comparison_summary += (
327+
f"- Detected a total of {total_improvements} improvements above the improvement water line.\n"
332328
)
333329
if total_regressions > 0:
334-
comparison_summary += "- Detected a total of {} regressions bellow the regression water line {}.\n".format(
335-
total_regressions, args.regressions_percent_lower_limit
330+
comparison_summary += (
331+
f"- Detected a total of {total_regressions} regressions bellow the regression water line {args.regressions_percent_lower_limit}%.\n"
336332
)
333+
comparison_summary += "\n"
337334

338335
comment_body += comparison_summary
339336
comment_body += "\n"
@@ -1102,9 +1099,9 @@ def get_v_pct_change_and_largest_var(
11021099
comparison_values.append(tuple[1])
11031100

11041101
comparison_df = pd.DataFrame(comparison_values)
1105-
comparison_median = float(comparison_df.median())
1102+
comparison_median = float(comparison_df.median().iloc[0])
11061103
comparison_v = comparison_median
1107-
comparison_std = float(comparison_df.std())
1104+
comparison_std = float(comparison_df.std().iloc[0])
11081105
if verbose:
11091106
logging.info(
11101107
"comparison_datapoints: {} value: {}; std-dev: {}; median: {}".format(

redisbench_admin/utils/remote.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,15 @@ def push_data_to_redistimeseries(rts, time_series_dict: dict, expire_msecs=0):
629629
)
630630
for timeseries_name, time_series in time_series_dict.items():
631631
try:
632+
arch = "x86_64"
633+
if "arch" in time_series["labels"]:
634+
arch = time_series["labels"]["arch"]
635+
if arch == "aarch64" and "aarch64" not in timeseries_name:
636+
original_timeseries_name = timeseries_name
637+
timeseries_name = f"{timeseries_name}/arch/{arch}"
638+
logging.warning(
639+
f"overriding key named {original_timeseries_name} given it does not contain arch and it's not x86_64. new key={timeseries_name}"
640+
)
632641
exporter_create_ts(rts, time_series, timeseries_name)
633642
for timestamp, value in time_series["data"].items():
634643
try:

0 commit comments

Comments
 (0)