measure_with_setup

Function measure_with_setup 

Source
pub fn measure_with_setup<T, S, B>(
    config: &BenchmarkConfig,
    name: &str,
    module: &str,
    setup: S,
    bench: B,
) -> BenchResult
where S: FnOnce() -> T, B: FnMut(&T),
Expand description

Measure a benchmark with setup code that runs once before measurement.

This function is called by the generated benchmark wrapper for benchmarks with the setup attribute. Setup runs exactly once, then the benchmark function receives a reference to the setup data for each iteration.