mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: add pprof profiler/flamegraphs to all criterion benchmarks (#1425)
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
use criterion::{criterion_group, criterion_main, Criterion};
|
||||
use hex_literal::hex;
|
||||
use pprof::criterion::{Output, PProfProfiler};
|
||||
use reth_primitives::TransactionSigned;
|
||||
use reth_rlp::Decodable;
|
||||
|
||||
@ -16,5 +17,9 @@ pub fn criterion_benchmark(c: &mut Criterion) {
|
||||
});
|
||||
}
|
||||
|
||||
criterion_group!(benches, criterion_benchmark);
|
||||
criterion_group! {
|
||||
name = benches;
|
||||
config = Criterion::default().with_profiler(PProfProfiler::new(100, Output::Flamegraph(None)));
|
||||
targets = criterion_benchmark
|
||||
}
|
||||
criterion_main!(benches);
|
||||
|
||||
Reference in New Issue
Block a user