macro_rules! tango_benchmarks {
($($func_expr:expr),+) => { ... };
}Expand description
Registers benchmark in the system
Macros accepts a list of functions that produce any IntoBenchmarks type. All of the benchmarks
created by those functions are registered in the harness.
ยงExample
use std::time::Instant;
use tango_bench::{benchmark_fn, IntoBenchmarks, tango_benchmarks};
fn time_benchmarks() -> impl IntoBenchmarks {
[benchmark_fn("current_time", |b| b.iter(|| Instant::now()))]
}
tango_benchmarks!(time_benchmarks());