Repository navigation
ci: Nightly's Rust benchmark tests build twice instead of twelve times - #8522
Conversation
Quest-Claim: f9943b163a6b7eba
Each benchmark test ran in its own release build, and a release build links every selected test binary with fat LTO, so the job spent its hour linking. Two groups now build only the targets holding their benchmarks, in separate Nightly jobs. A filter that runs no test now fails its group, which caught the feed fetch benchmark measuring nothing since moq-net's async went opt-in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 54 seconds. View limit details
No actionable comments were generated in the recent review. WalkthroughThe changes add a release-mode Merge Risk:
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- One build per benchmark group:
sh/gh/nightly.shnow runsrust-testas a singlejust rs bench-testsrelease build that selects only the targets holding benchmarks (--lib,--bin moq-bench/--bin moq,--test integration), and splits the work intorust-test(transport stack) and a newrust-test-appsgroup (audio/c/mux/relay/cli/ffi). - Missing-test guard:
nextest()now fails the group when anytest(NAME)in the filter has no matching<testcase>in the JUnit report, so a benchmark behind an absent feature no longer passes silently. - Workflow split:
.github/workflows/nightly.ymlgains theRust application benchmark testsmatrix entry with its own artifact/path (bench-rust-test-apps), both groups reporting asrust-test. - Recipe consolidation:
bench-latency,bench-playback, andbench-feed-fetchare replaced by a genericbench-tests *args; the inventory rejects the removed recipes and the docs,#[ignore]reasons, and audio quests are updated to the surviving commands. - Inventory fix:
sh/gh/test-inventory.pyno longer invents a package-named binary when a[[bin]]already claimssrc/main.rs, which is what made--bin moqlook like it did not cover moq-cli's tests; a new inventory test covers the renamed-binary case. - Test coverage:
sh/gh/nightly.test.pyparametrizes both groups, makes the JUnit stub emit one<testcase>per filtered name, and adds a case asserting a filter that matches nothing fails the group.
I traced every benchmark name in both filters to a selected target: lib tests for moq-bench, moq-congestion, moq-quic, moq-net, moq-audio, moq-mux, moq-c, moq-relay, moq-cli, and moq-ffi; tests/integration for moq-net's mesh_sweep, moq-tokio's receive_credit/datagram_delivery, and moq-uring's benchmark_socket_queues module; and the moq-bench/moq-cli bins. sh/gh/nightly.test.py NightlyTest passes (14 tests) in this sandbox; sh/gh/test-inventory.test.py could not run here because just is not installed, which is an environment limitation rather than a PR issue.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏
…ust-test-hour # Conflicts: # quest/m1/audio-jitter-target/stretch.md
|
quest land watch: the merge queue removed this pull request at 8cd4127 because it conflicts with The land fixer works on it in the background, and the watcher re-enqueues it at the back of the queue once it is fixed or judged flaky, or hands it back here with what it needs. (written by quest land watch) |
|
quest land watch: armed auto-merge on this pull request at 3b734b1, so it joins the back of the merge queue once its required checks pass, with the land fixer's fix ( (written by quest land watch) |
…8522 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Problem
Nightly (Rust benchmark tests)hit its 60-minute timeout on every scheduled run since 11-07. In the 11-11 job the benchmarks themselves ran for about 4 minutes. The rest went to twelve separate release builds. Release is fat LTO withcodegen-units = 1, so every test binary a build selects gets a slow single-threaded link. Themoq-relay/moq-c/moq-mux/moq-cliinvocation alone took 25 minutes (21 of them onmoq-cli's test binaries) to run 5 tests.The same log shows
bench-feed-fetchran 0 tests.benchmark_feed_fetch_wakesis behind moq-net'sasyncfeature, which went opt-in, and nextest passes a filter that matches nothing.Approach
sh/gh/nightly.shruns each benchmark-test group as onejust rs bench-testsrelease build. It selects only the targets that hold benchmarks (--lib,--bin moq-bench/--bin moq,--test integration), so cargo links one binary per target instead of every test target of every package.rust-test: moq-bench, moq-congestion, moq-quic, moq-net (async), moq-tokio, moq-uringrust-test-apps(new jobNightly (Rust application benchmark tests)): moq-audio (playback), moq-mux, moq-c, moq-relay, moq-cli, moq-ffiNEXTEST_TEST_THREADS=1), under thebenchprofile with one JUnit report per run, and both groups publishrust-testreports.nightly.shnow fails a group when any test its filter names is missing from the JUnit report. This catches a test hidden behind a missing feature, which the static name check innightly.test.pycan't.just rs bench-testsreplacesbench-latency,bench-playbackandbench-feed-fetch. With no CI caller left, the test inventory rejects those three recipes, andbench-testscovers the same local runs. Their references (moq-bench README,#[ignore]reasons, two audio quests) are updated.sh/gh/test-inventory.pyfixes a bug the change surfaced. When a[[bin]]namedsrc/main.rs, the inventory still added a phantom binary named after the package, so--bin moqdidn't cover moq-cli's tests. Cargo doesn't infer that binary, and a new inventory test covers the case.Measurements
These are local from-scratch builds at
-j4, to mimic the 4-vCPU runner:moq-relay/moq-c/moq-mux/moq-cliinvocationrust-testrust-test-appsThe projections scale by the 1.4x ratio from the first row. The Rust cache only shortens these. The tests themselves ran for 262 s (
rust-test, 19 tests) and 63 s (rust-test-apps, 9 tests) locally, and every test passed. The real JUnit reports pass the new name check and produce 1073 and 138 report entries.Impact
bench-rust-test-appsstart a new history. Their oldbench-rust-testseries go stale.benchmark_feed_fetch_wakesgets measured for the first time since moq-net'sasyncwent opt-in.just rs bench-latency,bench-playbackandbench-feed-fetchare gone. Usejust rs bench-tests -p PACKAGE [--features ...] --run-ignored only -E 'test(NAME)'instead.Alternatives
bench-testsalready covers those runs.Choices made without asking
rust-test-apps, andrust-testkeeps the transport stack so most existing series keep their history.moq-ffinow builds with default features in the apps group, sharing that group's codec build, instead of--no-default-features.Caused by
asyncopt-in without enabling it forbench-feed-fetch, so that benchmark silently ran nothing.Follow-ups
Review
mechanical fix by codex, gpt-6.1-sol, medium effort:
Merged base and re·solved sh/gh/nightly.sh by retaining base's route benchmarks in the PR's grouped command; ran git diff --check base HEAD and nix develop --no-write-lock-file --option substituters '' -c just ci base (passed).(head 3b734b1)Rewritten by
quest reviewafter each round.01a1cd27-3c67-7c70-832c-f48f0b944a85, round 1The split preserves benchmark coverage, reporting, and serial release-mode execution with no actionable defects found, though validation was source-only and no builds or tests were run.Models
Size: M
Implementer: Claude Code, Opus 5.5, medium effort
(Written by Opus 5.5 with medium)