Simplify benchmark setup; support mutating machine
This commit is contained in:
@@ -3,15 +3,15 @@ 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");
|
||||
#[bench::normal(setup::prolog_benches()["count_edges_short"].setup())]
|
||||
fn bench_edges(mut run: impl FnMut()) {
|
||||
run();
|
||||
}
|
||||
|
||||
#[library_benchmark]
|
||||
#[bench::normal(setup::benches())]
|
||||
fn bench_numlist(mut b: setup::Benches) {
|
||||
b.run_once("numlist_short");
|
||||
#[bench::normal(setup::prolog_benches()["numlist_short"].setup())]
|
||||
fn bench_numlist(mut run: impl FnMut()) {
|
||||
run();
|
||||
}
|
||||
|
||||
library_benchmark_group!(
|
||||
|
||||
Reference in New Issue
Block a user