Skip to content

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

Closed
wyf027 wants to merge 1 commit into
sharkdp:masterfrom
wyf027:feat/auto-warmup-848
Closed

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

Conversation

@wyf027

@wyf027 wyf027 commented May 26, 2026

Copy link
Copy Markdown

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