pub struct SimpleBench {
pub name: &'static str,
pub module: &'static str,
pub run: fn(&BenchmarkConfig) -> BenchResult,
}Expand description
A registered benchmark function.
This struct is used by the inventory crate for compile-time benchmark registration.
The #[bench] macro from simplebench-macros generates these registrations automatically.
The run function encapsulates the entire measurement process: it receives config,
performs warmup, runs measurement iterations, and returns a complete BenchResult.
This design allows benchmarks with setup to run setup once before measurement begins.
Fields§
§name: &'static strName of the benchmark function
module: &'static strModule path where the benchmark is defined
run: fn(&BenchmarkConfig) -> BenchResultThe benchmark runner function that performs measurement and returns results