Skip to content

bench: cover pattern matching and CMAF and Annex-B paths - #5663

Merged
kixelated merged 3 commits into
mainfrom
quest/m2/bench-coverage
Oct 16, 2026
Merged

kixelated merged 3 commits into
mainfrom
quest/m2/bench-coverage

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Problem

The nightly Rust Criterion set lacks pattern-union matching and complete CMAF/Annex-B import and export coverage. A container change can move work without an end-to-end benchmark showing it.

Approach

Add 18 pattern cases across union count/path depth and match/miss, plus 72 container cases across import/export, frame count, payload size, CMAF track count, and frame/byte throughput. Generate and validate fixtures, prepare publishers/importers, and destroy their owners outside the timed iteration. The timed export drains chunks without adding a collection copy.

Extend the existing nightly Rust benchmark invocation with the two targets. Its dispatcher regression asserts both package and target selection. Retire the completed quest and update the existing benchmark guide.

Validation

  • All 90 Criterion cases pass in functional --test mode; no timing comparison is inferred from this shared-host smoke.
  • Four nightly-dispatcher tests pass.
  • Focused Clippy, shellcheck, formatting, and quest consistency pass.
  • Strict Nix just ci check: EXIT 0 (compile/lint/docs/feature/WASM/flake/tooling).
  • Required just check: terminal EXIT 100 after 7,602 passes and 26 skips. moq-uring::endpoint unsupported_version_is_negotiated_only_by_servers failed at Worker::new with shared 8,192 KiB memlock ENOMEM; 193 cases were cancelled. No retries or host-setting changes. The failing endpoint source is unchanged by this PR. The full gate is not claimed green.
  • Complete the exact 171 cancelled non-ring cases separately: all pass. Capture: 466 passed/7 skipped; play: 192 passed/1 skipped. The failed ring case and 22 cancelled ring cases remain untouched.

Impact

Public API: none. Wire: none. Production dependencies: unchanged; moq-pattern gains the workspace Criterion dev dependency. Existing opaque catalog consumer work is respected through Source::catalog, without editing its export benchmark.

Alternatives

Keep setup in Criterion's timed closure, which would obscure container cost with fixture and publisher work. The existing shared nightly invocation is sufficient; a separate benchmark workflow adds no useful coverage.

Follow-ups

Read timing results from the nightly artifact before making performance claims. This change adds coverage and does not optimize either path. The full native ring gate still needs an environment with sufficient shared locked-memory budget; no host setting or retry workaround is part of this PR.

(Written by GPT-6)

kixelated and others added 3 commits October 15, 2026 18:39
Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review October 16, 2026 05:07
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T05:10:42.883371Z 49253a4 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 28de3bd7-0000-4347-95cb-e84cf3ea1986
📥 Commits

Reviewing files that changed from the base of the PR and between c01d806 and 49253a4.

⛔ Files ignored due to path filters: 1
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing: 10
  • bench/README.md
  • quest/m2/README.md
  • quest/m2/bench-ci.md
  • quest/m2/bench-coverage.md
  • rs/moq-mux/Cargo.toml
  • rs/moq-mux/benches/containers.rs
  • rs/moq-pattern/Cargo.toml
  • rs/moq-pattern/benches/matching.rs
  • sh/gh/nightly.sh
  • sh/gh/nightly.test.py
💤 Files with no reviewable changes: 3
  • quest/m2/bench-ci.md
  • quest/m2/bench-coverage.md
  • quest/m2/README.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

Walkthrough

The pull request adds Criterion benchmarks for moq-pattern matching and moq-mux CMAF and Annex-B import and export. It adds both benchmark targets to the nightly Rust benchmark command and updates the command test. The benchmark README documents the coverage and timing approach. The related m2 benchmark-coverage quest and its links are removed.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 49253

The benchmark coverage is mergeable after normal checks. The reported full-check failure remains an environment-limited validation gap, not an established regression from this change.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 4 files. (3 skipped: 3… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description check Passed The description clearly explains the benchmark coverage, nightly integration, validation results, and known environment-limited test failure. It is directly related to the changeset.
Title check Passed The title is concise and accurately identifies the main change: benchmark coverage for pattern matching and CMAF/Annex-B paths.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 4 files. (3 skipped: 3 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 Clippy (1.98.1)

Clippy execution timed out

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kixelated

Copy link
Copy Markdown
Collaborator Author

Merge summary:

  • Merged main to resolve conflicts with fix(ts)!: run the export one delay behind its source #5553's new moq-mux jitter bench. rs/moq-mux/Cargo.toml now declares both jitter and containers. In sh/gh/nightly.sh, the shared bench invocation keeps containers and matching, and the ignored-test invocation keeps main's -p moq-hls and benchmark_reference_handoff_fanout.
  • After the merge, local nix develop --command just check passes (EXIT 0). The memlock ENOMEM noted in the description did not recur. All 90 Criterion cases pass in --test mode, and PR CI is green.
  • Reviews: Codex found nothing and gave a +1. CodeRabbit had no actionable comments. I'm not acting on its docstring-coverage warning because it is about private bench helpers.
  • Possible follow-up, not in this PR: main's jitter bench from fix(ts)!: run the export one delay behind its source #5553 is not in the nightly bench invocation.

Public API: none. Wire: none.

(Written by Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 16, 2026
Merged via the queue into main with commit a7577da Oct 16, 2026
15 checks passed
@kixelated
kixelated deleted the quest/m2/bench-coverage branch October 16, 2026 05:47
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.

1 participant