Fix body stage insufficient backpressure (#7350)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
jn
2024-03-29 11:16:32 -07:00
committed by GitHub
parent be16072728
commit b1026e0e23
3 changed files with 38 additions and 16 deletions

View File

@ -69,12 +69,14 @@ rand.workspace = true
paste.workspace = true
# Stage benchmarks
pprof = { workspace = true, features = ["flamegraph", "frame-pointer", "criterion"] }
criterion = { workspace = true, features = ["async_futures"] }
# io
serde_json.workspace = true
[target.'cfg(not(target_os = "windows"))'.dev-dependencies]
pprof = { workspace = true, features = ["flamegraph", "frame-pointer", "criterion"] }
[features]
test-utils = ["reth-interfaces/test-utils", "reth-db/test-utils", "reth-provider/test-utils"]

View File

@ -3,6 +3,7 @@ use criterion::{
async_executor::FuturesExecutor, criterion_group, criterion_main, measurement::WallTime,
BenchmarkGroup, Criterion,
};
#[cfg(not(target_os = "windows"))]
use pprof::criterion::{Output, PProfProfiler};
use reth_config::config::EtlConfig;
use reth_db::{test_utils::TempDatabase, DatabaseEnv};
@ -18,11 +19,20 @@ use std::{ops::RangeInclusive, sync::Arc};
mod setup;
use setup::StageRange;
#[cfg(not(target_os = "windows"))]
criterion_group! {
name = benches;
config = Criterion::default().with_profiler(PProfProfiler::new(1000, Output::Flamegraph(None)));
targets = transaction_lookup, account_hashing, senders, merkle
}
#[cfg(target_os = "windows")]
criterion_group! {
name = benches;
config = Criterion::default();
targets = transaction_lookup, account_hashing, senders, merkle
}
criterion_main!(benches);
const DEFAULT_NUM_BLOCKS: u64 = 10_000;