Skip to content

Fix relative runtime ratios with an explicit reference - #952

Closed
sharkdp wants to merge 2 commits into
masterfrom
fix/reference-relative-ratios
Closed

sharkdp wants to merge 2 commits into
masterfrom
fix/reference-relative-ratios

Conversation

@sharkdp

@sharkdp sharkdp commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

With --sort command --reference 'sleep 2' 'sleep 1' 'sleep 3', the comparison currently shows both other commands with ratios above 1, obscuring which is faster. Compute runtime divided by reference runtime so the table shows 1.00, 0.50, and 1.50, with uncertainty scaled consistently. Preserve the prose summary's “times faster/slower” wording.

Make Markdown, AsciiDoc, and Org mode exports honor --reference and use the same ratios, regardless of sort order. Document the meaning of values below 1.

Validation: all 124 tests pass. Regression coverage uses insta-cmd for the terminal report and inline Insta snapshots for Markdown file/stdout exports across all sort modes, with additional tests for uncertainty, missing standard deviations, and zero runtimes. cargo clippy --locked --all-targets, cargo fmt -- --check, and git diff --check pass.

Fixes #811.

@sharkdp
sharkdp force-pushed the fix/reference-relative-ratios branch 2 times, most recently from 640e849 to fe64167 Compare October 5, 2026 09:10
@sharkdp
sharkdp marked this pull request as ready for review October 5, 2026 09:14
@sharkdp
sharkdp force-pushed the fix/reference-relative-ratios branch from fe64167 to 0d89bbc Compare October 5, 2026 10:56
@sharkdp
sharkdp force-pushed the fix/reference-relative-ratios branch from 0d89bbc to 7167df6 Compare October 5, 2026 12:20
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.

Use of both --sort command and --reference options leads to confusing relative speed table

1 participant