Add benchmarks using library interface

This commit is contained in:
infogulch
2023-11-11 11:22:02 -06:00
committed by Joe Taber
parent 1656d9d7ad
commit 8570f119c0
12 changed files with 727 additions and 21 deletions

21
benches/run_iai.rs Normal file
View File

@@ -0,0 +1,21 @@
use iai_callgrind::{library_benchmark, library_benchmark_group, main};
mod setup;
#[library_benchmark]
#[bench::normal(setup::benches())]
fn bench_edges(mut b: setup::Benches) {
b.run_once("count_edges_short");
}
#[library_benchmark]
#[bench::normal(setup::benches())]
fn bench_numlist(mut b: setup::Benches) {
b.run_once("numlist_short");
}
library_benchmark_group!(
name = bench_group;
benchmarks = bench_edges, bench_numlist
);
main!(library_benchmark_groups = bench_group);