summaryrefslogtreecommitdiff
path: root/benches/selfhosted.rs
diff options
context:
space:
mode:
authorHenry Gressmann <mail@henrygressmann.de>2024-01-27 02:40:08 +0100
committerHenry Gressmann <mail@henrygressmann.de>2024-01-27 02:40:08 +0100
commit9d30a1b0d93b45c05f86e61df77359303aab449d (patch)
treea2a0e84ff5e548143593c84396908e2745726d85 /benches/selfhosted.rs
parenta89f75ce42f83de09bad72c1baf697a007751b1b (diff)
pref: callstack/callframe improvements
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'benches/selfhosted.rs')
-rw-r--r--benches/selfhosted.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/benches/selfhosted.rs b/benches/selfhosted.rs
index 78ea48b..f78d958 100644
--- a/benches/selfhosted.rs
+++ b/benches/selfhosted.rs
@@ -30,9 +30,15 @@ const TINYWASM: &[u8] = include_bytes!("../examples/rust/out/tinywasm.wasm");
fn criterion_benchmark(c: &mut Criterion) {
let module = tinywasm_module(TINYWASM);
- c.bench_function("tinywasm", |b| b.iter(|| run_tinywasm(module.clone())));
- c.bench_function("wasmi", |b| b.iter(|| run_wasmi()));
+ let mut group = c.benchmark_group("selfhosted");
+ group.bench_function("tinywasm", |b| b.iter(|| run_tinywasm(module.clone())));
+ group.bench_function("wasmi", |b| b.iter(|| run_wasmi()));
}
-criterion_group!(benches, criterion_benchmark);
+criterion_group!(
+ name = benches;
+ config = Criterion::default().sample_size(500).measurement_time(std::time::Duration::from_secs(5)).significance_level(0.1);
+ targets = criterion_benchmark
+);
+
criterion_main!(benches);