Skip to content

feat: add --warmup auto to detect stable warmup count (fixes #848)#892

Open
leno23 wants to merge 1 commit into
sharkdp:masterfrom
leno23:feat/auto-warmup-848
Open

feat: add --warmup auto to detect stable warmup count (fixes #848)#892
leno23 wants to merge 1 commit into
sharkdp:masterfrom
leno23:feat/auto-warmup-848

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 26, 2026

Summary

Fixes #848.

Adds support for --warmup auto, which keeps performing warmup runs until the relative spread of the last 5 warmup timings is at most 1%. Warmup stops early once stable, or after 100 runs at most.

Numeric --warmup NUM behavior is unchanged.

Changes

  • Introduce WarmupOption (Disabled, Fixed, Auto) replacing the raw warmup_count
  • Parse --warmup auto in CLI/options
  • Refactor warmup execution in the benchmark runner and share iteration logic between fixed/auto modes
  • Add unit tests for parsing/stability detection and an integration smoke test

Test plan

  • cargo test warmup
  • cargo test test_parse_warmup_option test_is_warmup_stable
  • Full cargo test

Made with Cursor

)

Allow `--warmup auto` to keep performing warmup runs until the relative
spread of the last five runs is at most 1%, capped at 100 iterations.
Existing numeric `--warmup` behavior is unchanged.

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.

Feature proposal: Find optimal warmup parameter

1 participant