Repository navigation
bench: backport main's benchmark cases to release for the pre-cut pairing - #7586
Conversation
…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>
|
This run hit its 1h time limit while still working. Give runs longer with
|
kixelated
left a comment
There was a problem hiding this comment.
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.

Ports
main's benchmark cases thatreleaselacks ontorelease, so the pre-cut pairing (just bench origin/release, run frommain) 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 frommain. Wherereleaselacks an API the case only needs for setup, the bench shims it locally. A case that measures codereleasedoesn'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 intosession/mod.rs, which doesn't build onrelease. So the follow-up ports the case intorelease's single-filesession.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, onmain(bf4e726f66) and onrelease(14cdd522ae). I also tried building each target onlymainhas againstrelease. Every case below runs once in Criterion's test mode onrelease.Added
channelchannel_write_abandoned(3)main's file, unchangedframeframe_recv_large(18)main's file, unchangedtracktrack_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_delaybecomeswith_max_age, andPool::pollbecomesPool::gc. Only theplaindatagram payload, sincereleasehas no compression. Only thetimedsparse feed.groupgroup_contended(36), plus the 32- and 33-frame rows ofgroup_write_frames,group_read_frames, andgroup_roundtrip(16)Timestamp::ZERO, sincereleaseframes always carry oneoriginorigin/passthrough(4),origin/requestovermain's requester axis (12), andmain's neworigin/resume_overlapshapes, including the*_waitingvariants (10)request(path, None)becomesrequest_broadcast(path).release's 4origin/requestrows used IDsmainno longer has, so they're replaced.statsstats/session-report/*/connections=0(6)release's rows, undermain's ID.releasehas no transport wires, soconnections=1andconnections=4are left out.matchingpattern-algebra(46)main's file, unchangedparameter_sets(new)main's file, unchangedcontainersmkv-payloads(9),annexb-export-queued-groups(6),cmaf-interleaved-import(16 of 24),ts_si_{renewal,pending,table_history}_pcr(27)prepare_groupedadds the frames-per-group axis.mp4_atom0.15'sTrunnames its samplesentries. Only theimportdirection ofcmaf-interleaved, sincereleasealways republishes fragments whole. Its 8 whole-input rows name the input's length, andrelease's exported init is longer, so they couldn't pair and are left out.chunk_interleavingrtmp_amf0(6),rtmp_connect_fourccs(9)rtmp_amf0decodes withamf0::deserialize, whichmainreplaced withamf0::Values::decodehttp_auth(new)Grant::newtakesPatternsfor both sides onrelease. Addscriterionandh2as dev-dependencies.Cargo.lockonly gains moq-relay's two dev-dependency edges.Left out
Bench targets only
mainhas:endpoint,receive,sent_packets,streams,wire, and moq-uringecho_quic,unreachable_dials:releasehas no moq-quic; it ships noq.sign:releasehas no moq-sign.admission(server::Activity),auth(moq_net::auth),bandwidth(fuzz::ProbeTarget),canonical(fuzz::CanonicalStorage),codec,parameters, andpath(thefuzzmessage codecs),demand(Demand::poll_wanted_changed),interests,synced, andviewers(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), andschedule(compiles moq-quic's scheduler andsrc/priority.rs).catalog: the catalog estimate rate window and MSF references, as in moq-dev/moq#6103.decode_clock,jitter, andts_schedulecompile source modulesreleasedoesn't have.ts_programsneedsts::stats::Snapshot.ts_videomeasures TS video assembly across PES packets (moq-dev/moq#6534), and its fixture isn't onrelease.auth(moq_net::auth),http_idle(src/listener/idle.rs), andsession(main's split moq-net session harness).producer(nomoq_archive::Producer), moq-audiobus(nobusfeature), moq-statsproducer_tick(nobenchfeature, as in moq-dev/moq#6103), and moq-uringtimers(kio::clock).Cases in targets both branches have:
contended_log_lockfree(kio::log) andwake_16_of_1000/kio_tasks_batch(Waiter::batch).snapshot_budget/{bounded,unbounded}andtable/{deltas,snapshots}:mainrenamed these rows for delta snapshots (Config::with_deltas), whichreleaselacks.cmaf-unwrap-*andcmaf-interleaved-unwrap:release's fMP4 import has no unwrap mode.video-reorder:releasehas no reorder depth in the catalog or the MKV export.announce_replay: the lite replay module.group_inflate(no compression).group_shed:releasedoesn't shed a group's front, and it caps a group at 8,192 frames.track_stamp_groups/append_waiting: track requests and fetches.origin/announce_covering,takeover,restart_fronts, andtakeover_fronts(origin requests, covering, and epochs), andnarrowandnarrow_delivery(no session auth, as in moq-dev/moq#6103).session_delivery_compression(no compression), thewindow=64rows ofsession_delivery_creditandsession_delivery_group_cost(no constrained mock, as in moq-dev/moq#6103),session_delivery_fetch_rangeandsession_range_updates(track::Range), andsession_delivery_prefixes(client_discovers_alland announce events).stats/request,stats/retag, andstats/write(APIsreleaselacks, as in moq-dev/moq#6103), andstats/session-report/*/connections={1,4}(no transport wires).track_wall(wall-clock aging),track_fetch_park,track_fetch_budgets, andtrack_fetch_expiry(budgeted fetches),track_fill,track_range_*,track_subscription_ranges, andtrack_time_end(ranges, track requests, anchors),track_sparse_expire(wall-clock gap expiry),track_datagram_pressure/zeros(compression),track_sparse_{read,poll}/untimed, andtrack_empty_run/retired.track_budget_wideningbuilds, but its check fails onrelease: widening a budget re-offers none of the groups it skipped as stale.worker_turnschecked,direct, andlocal_thread_check(transport::memory,moq_uring::transport).Nothing to port for the other
just benchcases. The relay workloads runmain's load generator andbench/workloadsagainst the base's relay binary. The browser bench bundles its own pages. CodSpeed runs only onmain. JS benches aren't part of thejust benchpairing.Notes
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.Verification
All on
release(14cdd522ae) plus this change, Linux, rustc 1.98.1:cargo test --bench <target> -- <filter>), with no panics.cargo clippy --benches -- -D warningsis clean on moq-net (--features fuzz), kio, moq-mux, moq-pattern, moq-rtmp, and moq-relay.cargo fmt --all -- --check,cargo sort --workspace --check, andcargo shearare clean.-- --liston both branches confirms that every added case hasmain's ID.Review
Codex (
gpt-6.1-sol, medium effort) ran a localquest review --base origin/release, round 1, on head9ec64f5dc433dd9c76e8de9fb2ded6f4394b496b. 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 warningson moq-net (--features fuzz), kio, moq-mux, moq-pattern, moq-rtmp, and moq-relay is clean, and so iscargo fmt --all -- --check. The diff touches onlyrs/*/benches/, the bench and dev-dependency entries inCargo.toml, andCargo.lock.🤖 Generated with Claude Code
(Written by Claude Opus 5.5)