From 7af19389d829e131cb69d05eb30abd3da04cfd05 Mon Sep 17 00:00:00 2001 From: Thomas Wouters Date: Sat, 5 Apr 2025 23:43:57 +0200 Subject: [PATCH 1/2] Fix --same-loops handling so it doesn't accumulate --loops arguments in the pyperf args. --- pyperformance/run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyperformance/run.py b/pyperformance/run.py index e0df48d7..8b726036 100644 --- a/pyperformance/run.py +++ b/pyperformance/run.py @@ -159,7 +159,7 @@ def add_bench(dest_suite, obj): return dest_suite if name in loops: - pyperf_opts.append(f"--loops={loops[name]}") + pyperf_opts = [*pyperf_opts, f"--loops={loops[name]}"] bench_venv, bench_runid = benchmarks.get(bench) if bench_venv is None: From bee2900eb62b5c828f936a7741f72d9bd0fcd3d6 Mon Sep 17 00:00:00 2001 From: Thomas Wouters Date: Sun, 6 Apr 2025 00:36:08 +0200 Subject: [PATCH 2/2] Actually fix the bug now. --- pyperformance/run.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyperformance/run.py b/pyperformance/run.py index 8b726036..a9f9a102 100644 --- a/pyperformance/run.py +++ b/pyperformance/run.py @@ -129,7 +129,7 @@ def run_benchmarks(should_run, python, options): run_count = str(len(to_run)) errors = [] - pyperf_opts = get_pyperf_opts(options) + base_pyperf_opts = get_pyperf_opts(options) import pyperf for index, bench in enumerate(to_run): @@ -159,7 +159,9 @@ def add_bench(dest_suite, obj): return dest_suite if name in loops: - pyperf_opts = [*pyperf_opts, f"--loops={loops[name]}"] + pyperf_opts = [*base_pyperf_opts, f"--loops={loops[name]}"] + else: + pyperf_opts = base_pyperf_opts bench_venv, bench_runid = benchmarks.get(bench) if bench_venv is None: