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::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§

bench
table

Macros§

benchmark_main

Structs§

BenchSampleResult
Per-sample result returned by a benchmark function that wants to report custom metrics in addition to the standard timing/throughput/PMU pipeline.
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.
SampleMetric
Owned, serializable form of a per-sample crate::MetricValue.
SampleMetricSet
Custom metrics captured for one measured sample, preserved in execution order for drift and state-transition analysis.
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