diff --git a/bench-templates/src/lib.rs b/bench-templates/src/lib.rs index 92dbd07e..9500eb9c 100644 --- a/bench-templates/src/lib.rs +++ b/bench-templates/src/lib.rs @@ -54,7 +54,13 @@ pub fn bench_pcs_method< BenchmarkId::from_parameter(num_vars), &num_vars, |b, num_vars| { - b.iter(|| method(&ck, &vk, *num_vars, rand_poly, rand_point)); + b.iter_custom(|i| { + let mut time = Duration::from_nanos(0); + for _ in 0..i { + time += method(&ck, &vk, *num_vars, rand_poly, rand_point); + } + time + }); }, ); } diff --git a/poly-commit/benches/brakedown_ml_times.rs b/poly-commit/benches/brakedown_ml_times.rs index 860d0a99..55ebfa7f 100644 --- a/poly-commit/benches/brakedown_ml_times.rs +++ b/poly-commit/benches/brakedown_ml_times.rs @@ -52,8 +52,8 @@ fn rand_point_brakedown_ml(num_vars: usize, rng: &mut ChaCha20Rng (0..num_vars).map(|_| F::rand(rng)).collect() } -const MIN_NUM_VARS: usize = 10; -const MAX_NUM_VARS: usize = 20; +const MIN_NUM_VARS: usize = 12; +const MAX_NUM_VARS: usize = 22; bench!( Brakedown,