Skip to content

Commit

Permalink
feat: add benchmark for execution tracing
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-ferdinand committed Oct 17, 2023
1 parent 55c731e commit 11b360d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions triton-vm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,7 @@ harness = false
[[bench]]
name = "proof_size"
harness = false

[[bench]]
name = "trace_mmr_new_peak_calculation"
harness = false
20 changes: 20 additions & 0 deletions triton-vm/benches/trace_mmr_new_peak_calculation.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
use criterion::*;
use triton_vm::example_programs;

criterion_main!(benches);

criterion_group! {
name = benches;
config = Criterion::default();
targets = trace_mmr_new_peak_calculation
}

fn trace_mmr_new_peak_calculation(criterion: &mut Criterion) {
let program = example_programs::CALCULATE_NEW_MMR_PEAKS_FROM_APPEND_WITH_SAFE_LISTS.clone();

criterion.bench_function("Trace execution of finding new peaks for MMR", |bencher| {
bencher.iter(|| {
program.trace_execution([].into(), [].into()).unwrap();
});
});
}

0 comments on commit 11b360d

Please sign in to comment.