macro_rules! binary_benchmark_attribute { ($name:ident) => { ... }; }
Available on crate feature
default
only.Expand description
low level api only: Use to add a #[binary_benchmark]
to a
crate::BinaryBenchmarkGroup
ยงExamples
use iai_callgrind::{binary_benchmark_attribute, binary_benchmark_group, binary_benchmark};
#[binary_benchmark]
fn bench_binary() -> iai_callgrind::Command {
iai_callgrind::Command::new(env!("CARGO_BIN_EXE_my-foo"))
.arg("foo")
.build()
}
binary_benchmark_group!(
name = my_group;
benchmarks = |group: &mut BinaryBenchmarkGroup| {
group.binary_benchmark(binary_benchmark_attribute!(bench_binary));
}
);