This was heavily inspired by divan (especially the primary output format). I couldn't find any crates to get simple, fast and reliable percentile based reporting for tail latency analysis. It's a niche metric that a pretty small number of people would be interested in, but those that do work with concurrent data structures or tools where latency matters, might find this crate pretty useful.
Example output:
pbench: timer=tsc, precision=10.01 ns
bench_rwlock_btree p50 │ p95 │ p99 │ p99.9 │ p99.99 │ mean
├─ get_hit_1k │ │ │ │ │
│ ├─ t=1 13.32 µs │ 14.7 µs │ 19.05 µs │ 22.3 µs │ 27.59 µs │ 13.55 µs
│ ├─ t=2 13.23 µs │ 14.66 µs │ 20.15 µs │ 25.46 µs │ 44.9 µs │ 13.53 µs
│ ├─ t=4 13.59 µs │ 22.98 µs │ 23.51 µs │ 28.75 µs │ 46.97 µs │ 14.94 µs
│ ├─ t=6 22.79 µs │ 24.4 µs │ 28.46 µs │ 35.79 µs │ 57.79 µs │ 19.73 µs
│ ├─ t=8 23.59 µs │ 24.97 µs │ 29.49 µs │ 44.22 µs │ 48.4 µs │ 21.09 µs
│ ╰─ t=12 24.41 µs │ 25.87 µs │ 29.63 µs │ 50.8 µs │ 75.4 µs │ 23.61 µs
Currently only focuses on scaling behavior with increased number of threads, but I am working on improving the API to provide a native approach for contention behavior too (mixed workloads, reader/writer ratio etc, which is something I need for myself).
Repo: GitHub - consistent-milk12/pbench: A Rust benchmarking crate that reports precise percentile statistics (p50/p95/p99/p99.9/p99.99)
Crate: crates.io: Rust Package Registry