#[path = "../../tests/support/simulation.rs"]
mod oracle;
#[path = "../../tests/support/mod.rs"]
mod support;
use criterion::Criterion;
use harmos_runtime::Runtime;
use std::hint::black_box;
use support::{Bank, Ledger, catalog, streams};
criterion::criterion_group!(benches, benchmarks);
criterion::criterion_main!(benches);
fn benchmarks(criterion: &mut Criterion) {
criterion.bench_function("simulation/double_run_identity", |bench| {
bench.iter(|| {
let make = || {
oracle::scripted(Runtime::<Bank>::builder(Ledger::default(), ()).register(catalog()).register(streams()).entropy_seed(42))
};
let first = make();
let second = make();
first.assert_same(&second);
assert_eq!(first.trace(), second.trace());
black_box((first, second));
});
});
}