This directory contains repository-level benchmark orchestration. Rust
microbenchmarks stay beside their crates under rs/*/benches, while the
moq-bench load generator and host sampler stay in rs/moq-bench.
run.sh owns builds, comparison rounds, and reporting. relay.sh owns the
temporary relay lifecycle and load execution shared by each comparison mode.
Run every Criterion target plus the local relay workloads:
nix develop --command just benchCompare the current tree with another revision:
nix develop --command just bench origin/mainCompare one multi-threaded Tokio runtime with the same number of independent Tokio/epoll and io_uring workers:
nix develop --command just bench-runtime
nix develop --command just bench-runtime 5 16Runtime comparison requires Linux because io_uring and relay process metrics come from Linux interfaces. The default worker count is the number of online logical CPUs.
The workloads/ TOML files contain only traffic shape. The harness supplies the
temporary relay URL, TLS settings, startup ramp, run duration, reporting
interval, and output paths so every runtime receives the same load.
video: light many-to-many video traffic.fanout: light one-to-many traffic.video-heavy: multicore many-to-many video traffic.fanout-heavy: multicore one-to-many traffic near saturation.
The runtime matrix rotates execution order between rounds, then reports the median throughput, loss, latency, CPU split, context switches, RSS, and thread count. Compare CPU only when delivered throughput and loss are equivalent. A runtime that falls behind can use less CPU simply because it completed less work.
Benchmark output is informational and machine-specific. Crashes, zero delivery, and invalid samples still fail the command.