Skip to main content

Crate micromeasure

Crate micromeasure 

Source
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::BenchContext;
pub use bench::BenchmarkRunner;
pub use bench::ConcurrentBenchContext;
pub use bench::ConcurrentBenchControl;
pub use bench::ConcurrentBenchmarkGroup;
pub use bench::ConcurrentWorker;
pub use bench::ConcurrentWorkerResult;
pub use bench::CounterValue;
pub use bench::NoContext;
pub use table::Alignment;
pub use table::BorderColor;
pub use table::TableFormatter;
pub use bench::PerfCounters;
pub use perf_event;

Modules§

bench
table

Macros§

benchmark_main

Structs§

BenchmarkMainOptions
BenchmarkReport
Persisted benchmark report for serialization and optional comparisons.
BenchmarkResult
Collected benchmark result for session summary and JSON export
BenchmarkStats
Instant
A measurement of a monotonically nondecreasing clock. Opaque and useful only with Duration.
WorkerCounterSummary
WorkerSummary

Enums§

BenchmarkKind
ComparisonPolicy

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_box could do.
run_benchmark_main