You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to have an example for how to increase the sample size etc.
It took me longer than I am willing to admit to finally figure out, where I should use the corresponding members (e.g., sample_size) and it would have helped me a lot, if I found an example like:
use criterion::{black_box, criterion_group, criterion_main,Criterion};fnfibonacci(n:u64) -> u64{match n {0 => 1,1 => 1,
n => fibonacci(n-1) + fibonacci(n-2),}}fncriterion_benchmark(c:&mutCriterion){
c.bench_function("fib 20", |b| b.iter(|| fibonacci(black_box(20))));}criterion_group!(benches, criterion_benchmark);criterion_group!{
name = benches;
config = Criterion::default().sample_size(200);// changing e.g, sampling size
targets = criterion_benchmark
}criterion_main!(benches);
The text was updated successfully, but these errors were encountered:
It would be nice to have an example for how to increase the sample size etc.
It took me longer than I am willing to admit to finally figure out, where I should use the corresponding members (e.g.,
sample_size
) and it would have helped me a lot, if I found an example like:The text was updated successfully, but these errors were encountered: