chore: add pprof profiler/flamegraphs to all criterion benchmarks (#1425)

This commit is contained in:
joshieDo
2023-02-17 17:08:32 +08:00
committed by GitHub
parent fad9c04b07
commit 495db6e30d
11 changed files with 43 additions and 6 deletions

View File

@ -3,10 +3,15 @@
use criterion::{
black_box, criterion_group, criterion_main, measurement::WallTime, BenchmarkGroup, Criterion,
};
use pprof::criterion::{Output, PProfProfiler};
use reth_db::cursor::{DbDupCursorRO, DbDupCursorRW};
use std::time::Instant;
criterion_group!(benches, db, serialization);
criterion_group! {
name = benches;
config = Criterion::default().with_profiler(PProfProfiler::new(100, Output::Flamegraph(None)));
targets = db, serialization
}
criterion_main!(benches);
pub fn db(c: &mut Criterion) {