Skip to content

feat: add --aggregate-parameter-runs to combine parameter scan stats (fixes #778)#893

Open
leno23 wants to merge 1 commit into
sharkdp:masterfrom
leno23:feat/aggregate-parameter-runs-778
Open

feat: add --aggregate-parameter-runs to combine parameter scan stats (fixes #778)#893
leno23 wants to merge 1 commit into
sharkdp:masterfrom
leno23:feat/aggregate-parameter-runs-778

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 26, 2026

Summary

Fixes #778.

Adds --aggregate-parameter-runs for --parameter-scan / --parameter-list workloads where each parameter value should contribute one sample to the same benchmark (e.g. transferring different files once each).

Instead of reporting N separate benchmarks, hyperfine pools all timed runs and prints/exports a single mean ± σ summary for the shared command template.

Note: this is distinct from #830 (combining results from separate hyperfine invocations), which would need a different mechanism.

Changes

  • Add Options::aggregate_parameter_runs and CLI flag
  • Detect parameter-generated command sets via Commands::supports_parameter_aggregation()
  • Merge per-parameter BenchmarkResults with merge_parameter_benchmark_results()
  • Validate incompatibility with --reference
  • Add scheduler snapshot test

Example

hyperfine --runs 1 --aggregate-parameter-runs \
  --parameter-scan index 1 20 'transfer_data file{index}.dat'

Test plan

  • cargo test scheduler_aggregate_parameter_runs
  • Full cargo test

Made with Cursor

…ixes sharkdp#778)

When benchmarking one sample per parameter value, pool all timed runs into
a single mean/stddev summary instead of reporting separate benchmarks for
each substituted command.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Combine results from all parameters into one benchmark

1 participant