/// Speed test for loading and copying block proposals.
Speed test for loading and copying block proposals.
Speed test for loading and copying block proposals .
fn load_blocks(criterion: &mut Criterion) {
    let mut group = criterion.benchmark_group("block_loading");
    run_test("load_blocks", |pool: &mut ConsensusPoolImpl| {
        prepare(pool, 20);
        group.bench_function("Load blocks and sum their heights", |bench| {
            bench.iter(|| {
                sum_block_heights(pool);
            })
        });
        group.bench_function("Load blocks and sum their ingress counts", |bench| {
            bench.iter(|| {
                sum_ingress_counts(pool);
            })
        });
    })
}
fn load_blocks ( criterion : & mut Criterion ) { let mut group = criterion . benchmark_group ( " " ) ; run_test ( " " , | pool : & mut ConsensusPoolImpl | { prepare ( pool , 20 ) ; group . bench_function ( " " , | bench | { bench . iter ( | | { sum_block_heights ( pool ) ; } ) } ) ; group . bench_function ( " " , | bench | { bench . iter ( | | { sum_ingress_counts ( pool ) ; } ) } ) ; } ) }
Speed test for loading and copying block proposals.
Speed test for loading and copying block proposals .
criterion
&mut Criterion