mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
test: add pprof flamgegraph bench (#6712)
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -6969,6 +6969,7 @@ dependencies = [
|
||||
"metrics",
|
||||
"parking_lot 0.12.1",
|
||||
"paste",
|
||||
"pprof",
|
||||
"proptest",
|
||||
"rand 0.8.5",
|
||||
"reth-eth-wire",
|
||||
|
||||
@ -62,6 +62,7 @@ paste = "1.0"
|
||||
rand = "0.8"
|
||||
proptest.workspace = true
|
||||
criterion.workspace = true
|
||||
pprof = { workspace = true, features = ["criterion", "flamegraph"] }
|
||||
assert_matches.workspace = true
|
||||
tempfile.workspace = true
|
||||
serde_json.workspace = true
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
use criterion::{
|
||||
criterion_group, criterion_main, measurement::WallTime, BenchmarkGroup, Criterion,
|
||||
};
|
||||
use pprof::criterion::{Output, PProfProfiler};
|
||||
use proptest::{
|
||||
prelude::*,
|
||||
strategy::ValueTree,
|
||||
@ -233,5 +234,9 @@ fn truncate_basefee(
|
||||
});
|
||||
}
|
||||
|
||||
criterion_group!(truncate, txpool_truncate);
|
||||
criterion_group! {
|
||||
name = truncate;
|
||||
config = Criterion::default().with_profiler(PProfProfiler::new(100, Output::Flamegraph(None)));
|
||||
targets = txpool_truncate
|
||||
}
|
||||
criterion_main!(truncate);
|
||||
|
||||
Reference in New Issue
Block a user