pub fn run_benchmark_loop<F>(
bencher: Bencher,
runner_fn: F,
warmup_time_ns: u64,
measurement_time_ns: u64,
min_iterations: Option<u64>,
max_iterations: Option<u64>,
) -> BenchmarkResultExpand description
Run the full benchmark loop: warmup → measurement → finish
This is the shared implementation used by both in-process and isolated execution.
Extracts common logic to avoid duplication between worker.rs and executor.rs.
§Arguments
bencher- The Bencher instance (takes ownership)runner_fn- Function that calls the benchmark under testwarmup_time_ns- How long to run warmup phase (nanoseconds)measurement_time_ns- How long to run measurement phase (nanoseconds)min_iterations- Optional minimum measurement iterations before completionmax_iterations- Optional cap on measurement iterations