Skip to content

test: bound our four slowest parity tests (233 s of Fast Gate test time) #2891

Closed

Description

@vpacher

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:

  1. Measure first: the time per case, and for random_cases_match the share of inputs that prop_assume! rejects. A rejected input costs time and checks nothing. If the share is large, generate only defined inputs instead.
  2. Run again the deliberate-break mutants of the source PR and find the smallest input set at which each mutant is still killed:
  3. 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.
  4. Keep every assertion, every exhaustive part and every fixed edge case. Keep the proptest regression seeds.

Acceptance

Refs #2888 #2593

🤖 Generated with Claude Code

Activity

  1. vpacher commented on Oct 29, 2026

    @vpacher
    MemberAuthor

    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.

  2. added
    infra
    on Oct 29, 2026
  3. added
    ready
    on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

infraready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions