pbench 0.1.0

Percentile-focused benchmarking for Rust — p50/p95/p99/p99.9/p99.99
Documentation

pbench

Percentile-focused benchmarking for Rust. Reports p50/p95/p99/p99.9/p99.99 instead of just min/max/median/mean.

Built from scratch, heavily inspired by divan's architecture.

NOTE: Currently only supports single-threaded benches. Working on this for my masstree project, so I will eventually add multi-thread support.

Quick Start

Check the pbench/benches/ in repo.

use pbench::Bencher;

#[pbench::bench]
fn my_benchmark(b: &Bencher<'_>) {
    b.bench_refs(|| {
        // code to benchmark
        std::hint::black_box(1u64 + 2)
    });
}

fn main() {
    pbench::main();
}

License

MIT