Tests: compare benchmark regression thresholds #2959
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2959"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by bmjask on 2026-11-27T05:15:28Z.
Part of #2508.
This is stack slice 308. Only top commit
b4c93f2bb7834a8dc2dc601a6e286fe02920ecb2belongs to this PR; the preceding commits are prerequisite stack history rebased ontoxcl-dev/mainc2ee10e4e905eb736e56953c52b749e18bcc7ede.Add a deterministic comparator for versioned benchmark NDJSON. Matching candidate medians are compared directly with the baseline-scaled limit so an exactly-at-limit result remains inclusive despite floating-point rounding.
What is in it
crates/xcl/src/bin/bench_compare.rs: parse, validate and compare records; cover exact-boundary and just-over-boundary thresholds plus malformed or incomparable inputs.crates/xcl/Cargo.toml: registerxcl-bench-compare.README.md: document the command and comparison rule.Tested
b4c93f2bb7834a8dc2dc601a6e286fe02920ecb2:./scripts/test.ps1 --nocapture --skip test_title_runs_and_game_folder_is_untouchedon GitHub-hosted Windows Server 2025, stable Rust 1.100.0, Microsoft Basic Render Driver: 39 test binaries, 2067 passed, 0 failed, 48 ignored, 361 GPU tests skipped. https://github.com/xcl-dev/xcl/actions/runs/46002348248git diff --check c2ee10e4e905eb736e56953c52b749e18bcc7ede..b4c93f2bb7834a8dc2dc601a6e286fe02920ecb2passed.Regression run
Not tested
AI use
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-27T05:27:17Z.
Review: COMMENTED
On
a933c83fac6636f9481a21ce403c32c8e5fde4f9, an exactly-at-limit measurement can be reported as a regression because(after / before - 1.0) * 100.0rounds upward before the> limitcomparison. I ran the exact comparator on Windows with matching one-record NDJSON inputs: baseline 100 ns, candidate 105 ns, limit 5%. It printedchange +5.00%, limit +5.00%but exited 1 withREGRESSIONbecause the internal value is5.000000000000004. This contradicts the documented rule that a change must exceed the limit. Could the threshold comparison avoid this floating boundary error and add an inclusive at-limit fixture? The displayed percentage can remain rounded for readability. This is a focused CLI run, not a workspace or GPU run.AI use: OpenAI Codex (GPT-6.2 Sol) compiled and ran the exact-head comparator with synthetic records; OpenAI Codex (GPT-6.2 Astra) checked the source and wrote this review.
Imported from ivall/xcl. Originally posted by bmjask on 2026-11-27T13:06:38Z.
@luckyteagirl Addressed at
b4c93f2b. The regression decision now compares the candidate median directly againstbaseline * (1 + limit / 100)in the measurement domain, avoiding the rounded percentage subtraction at the boundary. The fixtures cover 100 -> 105 at 5% as inclusive and 100 -> 105.000001 as a regression. Windows CI passed: 39 binaries, 2067 passed, 0 failed, 48 ignored, 361 GPU tests skipped (run).Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-27T22:50:58Z.
Tested
Clean detached
b4c93f2bb7834a8dc2dc601a6e286fe02920ecb2on Windows 11 x64 build 26200.9974, Ryzen 7 3800X, and Rust 1.100.0 MSVC debug. I reran the pinnedxcl-bench-compare.exe <baseline.ndjson> <candidate.ndjson> --max-regression-percent 5with hash-verified synthetic version-1 NDJSON.PASS, unchanged rowPASSREGRESSION, unchanged rowPASSBoth threshold rows displayed
+5.00%. The pinned stock comparator unit binary also passed 4 tests, with zero failures, ignores, or skips, using--nocapture --test-threads=1. All artifact hashes held.Not tested
Actual benchmark workloads, metadata emission by other tools, GPU execution, retail smoke, and the full workspace suite.
AI use
T3 Code / Codex (
gpt-6.2-sol) independently reran the CLI and unit controls and wrote this report.