Repository navigation
Closed
Description
Summary
Four parity tests that we wrote are among the slowest in the Fast Gate unit test step. Together they take 233 s of test time on each run (merge-queue run 40836910827, job "Build / Fast Gate", 2026-10-29):
| Time | Test | Source | Cause |
|---|---|---|---|
| 147.9 s | obs_core::audio_discard_parity::random_cases_match |
#2404 | 20,000 proptest cases, and prop_assume!(c_defined(&c)) rejects the inputs the C does not define |
| 31.8 s | obs_core::audio_mix_parity::mix_on_every_start_frame |
#1909 | every one of the 1,024 start frames, x 3 timestamps x 2 rates |
| 30.9 s | render::state_stacks_parity::sequences |
#2528 | 5,000 proptest cases of up to 60 calls |
| 21.6 s | obs_core::audio_mix_parity::mix_matches |
#1909 | 4,096 proptest cases |
random_cases_match is the slowest test of the whole step and the only one that nextest marks SLOW past 120 s.
This is the part of #2888 (row A) that is ours. It does not depend on the budget decision there: each test must get shorter whatever the limit is.
Plan
One PR, one commit for each test. For each test:
- Measure first: the time per case, and for
random_cases_matchthe share of inputs thatprop_assume!rejects. A rejected input costs time and checks nothing. If the share is large, generate only defined inputs instead. - Run again the deliberate-break mutants of the source PR and find the smallest input set at which each mutant is still killed:
- obs-core: Port the audio input discard steps (#2403) #2404: 19 mutants, all killed;
- obs-core: Port the audio tick arithmetic (#1903) #1909: 21 mutants, 20 killed, 1 equivalent survivor;
- obs-graphics: Port the graphics state stacks (#2517, fixes #2519) #2528: 16 mutants, 14 killed, 2 equivalent survivors.
- Reduce the test to that set with a margin, aiming for less than about 5 s each on the CI runner (the new-test target that perf(ci): 26 Rust tests take 48 % of the Fast Gate test time; add a per-test time budget #2888 proposes):
random_cases_match: fewer cases (about 1,000 to 2,000), and no rejected inputs;mix_on_every_start_frame: the first and the last 8 start frames and every 61st frame, at the 3 timestamps and both rates;sequences: about 1,000 cases;mix_matches: about 512 cases.
- Keep every assertion, every exhaustive part and every fixed edge case. Keep the proptest regression seeds.
Acceptance
- Each of the four tests takes less than about 5 s in the Fast Gate step (the PR reports before and after, on the CI runner and locally).
- The same mutants as in obs-core: Port the audio input discard steps (#2403) #2404, obs-core: Port the audio tick arithmetic (#1903) #1909 and obs-graphics: Port the graphics state stacks (#2517, fixes #2519) #2528 are killed; the same equivalent mutants survive. The PR has the table.
- Peak RSS and time of each changed test over 25 runs, as the "Test cost" line of perf(ci): 26 Rust tests take 48 % of the Fast Gate test time; add a per-test time budget #2888 (C) proposes.
- No change outside these test files.
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsDone
Activity
vpacher commentedon Oct 29, 2026
Claiming: #2891
Plan as in the issue: one PR, one commit for each of the four tests. Measure first (time per case, the
prop_assume!rejection share), find the smallest input set that still kills the mutants of #2404, #1909 and #2528, then reduce with a margin. The PR reports the time before and after, the mutant table, and peak RSS over 25 runs. I expect a PR within 48 hours.test: Bound our four slowest parity tests (obs-rust#2891) (obs-rust#2898