Expand description
Microbenchmark harness for tiny operations where PMU behaviour matters.
This crate provides a reusable microbenchmark framework with:
- Performance counter integration (Linux only)
- Console output with Unicode tables
- Explicit report rendering and JSON persistence
- Warm-up and calibration phases
- Progress indicators
- Generic table formatting
Re-exports§
pub use bench::LinuxPerfBackend;pub use bench::BenchContext;pub use bench::BenchmarkCaseOrder;pub use bench::BenchmarkRunner;pub use bench::BenchmarkRuntimeOptions;pub use bench::ConcurrentBenchContext;pub use bench::ConcurrentBenchControl;pub use bench::ConcurrentBenchmarkGroup;pub use bench::ConcurrentSampleInfo;pub use bench::ConcurrentSampleLifecycle;pub use bench::ConcurrentSamplePhase;pub use bench::ConcurrentWorker;pub use bench::ConcurrentWorkerResult;pub use bench::CounterValue;pub use bench::DiagnosticError;pub use bench::DiagnosticResult;pub use bench::MeasurementBackend;pub use bench::MeasurementDomain;pub use bench::MetricFormat;pub use bench::MetricValue;pub use bench::NoContext;pub use bench::Throughput;pub use bench::WallClockBackend;pub use table::Alignment;pub use table::BorderColor;pub use table::TableFormatter;pub use bench::PerfCounters;pub use perf_event;
Modules§
Macros§
Structs§
- Bench
Sample Result - Per-sample result returned by a benchmark function that wants to report custom metrics in addition to the standard timing/throughput/PMU pipeline.
- Benchmark
Main Options - Benchmark
Report - Persisted benchmark report for serialization and optional comparisons.
- Benchmark
Result - Collected benchmark result for session summary and JSON export
- Benchmark
Stats - Instant
- A measurement of a monotonically nondecreasing clock.
Opaque and useful only with
Duration. - Sample
Metric - Owned, serializable form of a per-sample
crate::MetricValue. - Sample
Metric Set - Custom metrics captured for one measured sample, preserved in execution order for drift and state-transition analysis.
- Worker
Counter Summary - Worker
Summary
Enums§
Functions§
- benchmark_
filter_ from_ args - benchmark_
filter_ from_ env - black_
box - An identity function that hints to the compiler to be maximally pessimistic about what
black_boxcould do. - run_
benchmark_ main