Benchmarking
This page describes the public benchmark surface for IndexBus and how to compare results without overstating what they mean.
IndexBus owns benchmarkable transport, routing, and typed-message patterns in this repository. The primary checked-in harness is the indexbus-bench crate, which is run with Criterion.
What this page is for
- identify which checked-in benchmark surfaces belong to IndexBus
- connect pattern-level docs to runnable harnesses
- define the minimum context that should travel with any published result
Benchmark surfaces in this repo
The repo currently exposes three practical benchmark surfaces:
- pattern benchmarks through
cargo bench -p indexbus-bench --bench patterns - structured messaging benches through
cargo bench -p indexbus-bench --bench structured_messaging - stream-oriented benches through
cargo bench -p indexbus-bench --bench streams
Those benches live under crates/indexbus-bench and cover typed roundtrips, fanout, transport codec costs, and deployable routing patterns.
Read these as topology evidence
IndexBus results are sensitive to topology.
- SPSC, MPSC, and fanout shapes should not be compared as if they were the same workload.
- In-process and cross-process paths should not be merged into one headline number.
- Wake strategy, batching, subscriber lag posture, and overrun behavior can dominate the result.
When sharing results, state the topology first and the number second.
Minimum reporting set
When you publish or compare IndexBus numbers, include at least:
- the bench suite and bench name
- payload shape or codec family
- process boundary, transport choice, and wait strategy
- CPU pinning, NUMA locality, and whether
perfcounters were captured - throughput plus latency percentiles
If you benchmark one of the standard lane patterns, use the same pattern names described in Lanes (v1): core execution patterns.
Interpreting the result
Use benchmark output to answer one of these questions:
- what is the steady-state cost of a specific transport or codec path?
- how does a routing pattern behave under the same host posture?
- where does overrun or wake behavior start to dominate the datapath?
Do not treat a single Criterion run as a support contract. The normative contract remains in the v1 spec, and the operational contract remains in the triage and counter guides.