Skip to content

Commit

Permalink
fix bench call
Browse files Browse the repository at this point in the history
  • Loading branch information
mmagician committed Nov 10, 2023
1 parent d415053 commit 9f2dce9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bench-templates/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,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
});
},
);
}
Expand Down

0 comments on commit 9f2dce9

Please sign in to comment.