github selkies-project/selkies aea4d12

latest release: e8e330a
pre-releaseone hour ago

ci(codspeed): Benchmark the WebRTC transport's hot paths

The last part of #548: CodSpeed reports on every pull request what it
changes in the per-frame and per-packet cost of the transport, against
main. #498 set this up for the Python stack this tree no longer has;
these are its paths in the Rust one, with what the plan added.

crates/selkies-rtc/benches/hot_paths.rs, on codspeed-criterion-compat
(Criterion's API; cargo bench -p selkies-rtc times it locally):

  • RTP: a 1180-byte video packet with mid, abs-send-time and
    transport-cc serialized and parsed; a browser's compound RTCP parsed
    (the fuzz corpus's);
  • H.264 packetized: a 120 KB IDR (FU-A), a 4 KB delta, eight 300-byte
    slices (STAP-A); the IDR's fragments depayloaded; VP8 packetized at a
    two-byte picture id;
  • a FlexFEC repair over ten packets;
  • SRTP AES-128-GCM protect in place and unprotect, on AWS-LC (#576);
  • the corpus's browser answer parsed and printed;
  • a STUN binding request built, parsed, and verified.
    Inputs are fixed, so every run measures one path (the review of #498
    found a random VP8 picture id varying it), and each path is checked to
    succeed before it is timed. An unprotect runs on a fresh receiving
    context each time, since one context's replay window refuses the same
    packet twice.

.github/workflows/codspeed.yaml runs them under the simulation
instrument (instruction counts, not time) on pushes to main, pull
requests and dispatch, uploading through OIDC as #498 did; a pull
request's newer push cancels its older run, and every main commit keeps
its own as the baseline. cargo-codspeed is pinned to the compat crate's
version. The README carries the badge, the development guide the
benchmarks.

Don't miss a new selkies release

NewReleases is sending notifications on new releases.