pub fn run(
    b: &Benchmark,
    bench: impl FnMut() -> anyhow::Result<usize>,
) -> anyhow::Result<Vec<Sample>> {
    run_and_count(b, |count| Ok(count), bench)
}
Run the given `bench` function repeatedly until either the maximum
time or number of iterations has been reached and return the set of
samples.
benchmarks/shared/lib.rs