Skip to content

bench: backport main's benchmark cases to release for the pre-cut pairing - #7586

Merged
kixelated merged 1 commit into
releasefrom
backport/benches-2026-11
Nov 2, 2026
Merged

kixelated merged 1 commit into
releasefrom
backport/benches-2026-11

Conversation

@kixelated

@kixelated kixelated commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Ports main's benchmark cases that release lacks onto release, so the pre-cut pairing (just bench origin/release, run from main) compares them. This is the first bench-only backport under the rule in moq-dev/moq#7581, which the maintainer approved on 2026-11-01 in moq-dev/moq#7493: "I'm fine with bench only backports going forward, check what other benchmarks could be backported."

bench/run.sh <base> pairs Criterion cases by manifest, target, and case ID, so every case added here keeps its ID from main. Where release lacks an API the case only needs for setup, the bench shims it locally. A case that measures code release doesn't have is left out, as moq-dev/moq#6103 did. No shipped code changes.

session_fanout_threads, the case from moq-dev/moq#7493, follows once that PR lands. It isn't a plain cherry-pick: main's session harness is split into session/mod.rs, which doesn't build on release. So the follow-up ports the case into release's single-file session.rs, adding the process CPU clock and a multi-threaded runtime.

How the gap was found

I listed every case ID (-- --list) of the bench targets both branches declare, on main (bf4e726f66) and on release (14cdd522ae). I also tried building each target only main has against release. Every case below runs once in Criterion's test mode on release.

Added

Target Cases Change
kio channel channel_write_abandoned (3) main's file, unchanged
moq-net frame frame_recv_large (18) main's file, unchanged
moq-net track track_evict_fanout (12), track_idle_poll (8), track_datagram_pressure/plain (9), track_sparse_poll/timed (3), track_gc/advancing (4), track_gap_flush/{16,256} (2) with_max_delay becomes with_max_age, and Pool::poll becomes Pool::gc. Only the plain datagram payload, since release has no compression. Only the timed sparse feed.
moq-net group group_contended (36), plus the 32- and 33-frame rows of group_write_frames, group_read_frames, and group_roundtrip (16) The contended readers write Timestamp::ZERO, since release frames always carry one
moq-net origin origin/passthrough (4), origin/request over main's requester axis (12), and main's new origin/resume_overlap shapes, including the *_waiting variants (10) request(path, None) becomes request_broadcast(path). release's 4 origin/request rows used IDs main no longer has, so they're replaced.
moq-net stats stats/session-report/*/connections=0 (6) release's rows, under main's ID. release has no transport wires, so connections=1 and connections=4 are left out.
moq-pattern matching pattern-algebra (46) main's file, unchanged
moq-mux parameter_sets (new) 8 main's file, unchanged
moq-mux containers mkv-payloads (9), annexb-export-queued-groups (6), cmaf-interleaved-import (16 of 24), ts_si_{renewal,pending,table_history}_pcr (27) A local prepare_grouped adds the frames-per-group axis. mp4_atom 0.15's Trun names its samples entries. Only the import direction of cmaf-interleaved, since release always republishes fragments whole. Its 8 whole-input rows name the input's length, and release's exported init is longer, so they couldn't pair and are left out.
moq-rtmp chunk_interleaving rtmp_amf0 (6), rtmp_connect_fourccs (9) rtmp_amf0 decodes with amf0::deserialize, which main replaced with amf0::Values::decode
moq-relay http_auth (new) 9 Grant::new takes Patterns for both sides on release. Adds criterion and h2 as dev-dependencies.

Cargo.lock only gains moq-relay's two dev-dependency edges.

Left out

Bench targets only main has:

  • moq-quic endpoint, receive, sent_packets, streams, wire, and moq-uring echo_quic, unreachable_dials: release has no moq-quic; it ships noq.
  • moq-sign sign: release has no moq-sign.
  • moq-net admission (server::Activity), auth (moq_net::auth), bandwidth (fuzz::ProbeTarget), canonical (fuzz::CanonicalStorage), codec, parameters, and path (the fuzz message codecs), demand (Demand::poll_wanted_changed), interests, synced, and viewers (session interests, snapshots, and views), memory (transport::memory, origin::Publication), refresh (Info::with_refresh), retirement (fuzz::RequestValidity, origin requests), tail (fuzz::received), tracks (broadcast::Tracks), and schedule (compiles moq-quic's scheduler and src/priority.rs).
  • moq-mux catalog: the catalog estimate rate window and MSF references, as in moq-dev/moq#6103. decode_clock, jitter, and ts_schedule compile source modules release doesn't have. ts_programs needs ts::stats::Snapshot. ts_video measures TS video assembly across PES packets (moq-dev/moq#6534), and its fixture isn't on release.
  • moq-relay auth (moq_net::auth), http_idle (src/listener/idle.rs), and session (main's split moq-net session harness).
  • moq-archive producer (no moq_archive::Producer), moq-audio bus (no bus feature), moq-stats producer_tick (no bench feature, as in moq-dev/moq#6103), and moq-uring timers (kio::clock).

Cases in targets both branches have:

  • kio contended_log_lockfree (kio::log) and wake_16_of_1000/kio_tasks_batch (Waiter::batch).
  • moq-json snapshot_budget/{bounded,unbounded} and table/{deltas,snapshots}: main renamed these rows for delta snapshots (Config::with_deltas), which release lacks.
  • moq-mux cmaf-unwrap-* and cmaf-interleaved-unwrap: release's fMP4 import has no unwrap mode. video-reorder: release has no reorder depth in the catalog or the MKV export.
  • moq-net announce_replay: the lite replay module.
  • moq-net group_inflate (no compression). group_shed: release doesn't shed a group's front, and it caps a group at 8,192 frames. track_stamp_groups/append_waiting: track requests and fetches.
  • moq-net origin/announce_covering, takeover, restart_fronts, and takeover_fronts (origin requests, covering, and epochs), and narrow and narrow_delivery (no session auth, as in moq-dev/moq#6103).
  • moq-net session_delivery_compression (no compression), the window=64 rows of session_delivery_credit and session_delivery_group_cost (no constrained mock, as in moq-dev/moq#6103), session_delivery_fetch_range and session_range_updates (track::Range), and session_delivery_prefixes (client_discovers_all and announce events).
  • moq-net stats/request, stats/retag, and stats/write (APIs release lacks, as in moq-dev/moq#6103), and stats/session-report/*/connections={1,4} (no transport wires).
  • moq-net track_wall (wall-clock aging), track_fetch_park, track_fetch_budgets, and track_fetch_expiry (budgeted fetches), track_fill, track_range_*, track_subscription_ranges, and track_time_end (ranges, track requests, anchors), track_sparse_expire (wall-clock gap expiry), track_datagram_pressure/zeros (compression), track_sparse_{read,poll}/untimed, and track_empty_run/retired. track_budget_widening builds, but its check fails on release: widening a budget re-offers none of the groups it skipped as stale.
  • moq-uring worker_turns checked, direct, and local_thread_check (transport::memory, moq_uring::transport).

Nothing to port for the other just bench cases. The relay workloads run main's load generator and bench/workloads against the base's relay binary. The browser bench bundles its own pages. CodSpeed runs only on main. JS benches aren't part of the just bench pairing.

Notes

  • Merging this touches rs/**, so release-plz will propose patch bumps for kio, moq-net, moq-pattern, moq-mux, moq-rtmp, and moq-relay. Only benchmark code changed.
  • Public API: none. Wire: none.

Verification

All on release (14cdd522ae) plus this change, Linux, rustc 1.98.1:

  • Every added case ran once in Criterion's test mode (cargo test --bench <target> -- <filter>), with no panics.
  • cargo clippy --benches -- -D warnings is clean on moq-net (--features fuzz), kio, moq-mux, moq-pattern, moq-rtmp, and moq-relay.
  • cargo fmt --all -- --check, cargo sort --workspace --check, and cargo shear are clean.
  • -- --list on both branches confirms that every added case has main's ID.

Review

Codex (gpt-6.1-sol, medium effort) ran a local quest review --base origin/release, round 1, on head 9ec64f5dc433dd9c76e8de9fb2ded6f4394b496b. It reported no findings.

The OpenAI online review on the same head found no actionable bugs. The optional pullfrog run hit its 1h time limit without posting any findings.

Re-checked on this head: cargo clippy --locked --benches -- -D warnings on moq-net (--features fuzz), kio, moq-mux, moq-pattern, moq-rtmp, and moq-relay is clean, and so is cargo fmt --all -- --check. The diff touches only rs/*/benches/, the bench and dev-dependency entries in Cargo.toml, and Cargo.lock.

🤖 Generated with Claude Code

(Written by Claude Opus 5.5)

…ring

Adds the Criterion cases main has and release lacks, under main's case IDs,
wherever they build against release's APIs with only bench-local shims:
kio, moq-net track/group/origin/stats/frame, moq-pattern, moq-mux
containers and parameter_sets, moq-rtmp, and moq-relay http_auth. No
shipped code changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pullfrog

pullfrog Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

This run hit its 1h time limit while still working. Give runs longer with --timeout=2h (or --notimeout) in this repo's instructions, or raise the workflow's timeout input if it sets one, since that input wins. A smaller PR or a lower effort also finishes sooner.

Repo settings → · Flags →

Pullfrog  | Rerun failed job ➔ | View workflow run | via Pullfrog | Using deepseek-v4.1-flash (free via Pullfrog for OSS)

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review by review (OpenAI)

Reviewed commit: 9ec64f5

No actionable bugs found in the benchmark backport. The direction looks sound: keep the paired case IDs and workload axes, adapt setup to release APIs locally, and omit cases that depend on functionality release does not have. That is simpler and safer than backporting production features just to run the benchmarks. The contended-group synchronization, grouped export fixtures, and max-age/cache-clock adaptations look consistent with that scope.

Verification: static review of the changes and relevant surrounding APIs, with comparison against the cited main benchmark sources. I did not run Criterion, tests, or the main/release pairing, so this does not establish passing checks or comparable measured performance.

@kixelated
kixelated merged commit 8b1fa1d into release Nov 2, 2026
40 of 41 checks passed
@kixelated
kixelated deleted the backport/benches-2026-11 branch November 2, 2026 16:46
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