From 1e4e9c56d8ed93c3e859f76164c97144bf4596aa Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Tue, 24 Dec 2024 07:39:17 +0700 Subject: [PATCH] bet --- crates/engine/tree/benches/channel_perf.rs | 2 +- crates/engine/tree/benches/state_root_task.rs | 3 +-- crates/net/network/benches/broadcast.rs | 1 - crates/stages/stages/benches/setup/mod.rs | 2 +- crates/storage/db/benches/hash_keys.rs | 2 +- crates/storage/db/benches/utils.rs | 2 +- 6 files changed, 5 insertions(+), 7 deletions(-) diff --git a/crates/engine/tree/benches/channel_perf.rs b/crates/engine/tree/benches/channel_perf.rs index 505d9e790863..5eb919da8b34 100644 --- a/crates/engine/tree/benches/channel_perf.rs +++ b/crates/engine/tree/benches/channel_perf.rs @@ -3,7 +3,7 @@ #![allow(missing_docs)] use criterion::{criterion_group, criterion_main, BatchSize, BenchmarkId, Criterion}; -use proptest::test_runner::{TestRng, TestRunner}; +use proptest::test_runner::TestRunner; use rand::Rng; use revm_primitives::{ Account, AccountInfo, AccountStatus, Address, EvmState, EvmStorage, EvmStorageSlot, HashMap, diff --git a/crates/engine/tree/benches/state_root_task.rs b/crates/engine/tree/benches/state_root_task.rs index b965924a318c..2824073d38f1 100644 --- a/crates/engine/tree/benches/state_root_task.rs +++ b/crates/engine/tree/benches/state_root_task.rs @@ -4,8 +4,7 @@ #![allow(missing_docs)] use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion}; -use proptest::test_runner::{TestRng, TestRunner}; -use rand::SeedableRng; +use proptest::test_runner::TestRunner; use reth_engine_tree::tree::root::{StateRootConfig, StateRootTask}; use reth_evm::system_calls::OnStateHook; use reth_primitives::{Account as RethAccount, StorageEntry}; diff --git a/crates/net/network/benches/broadcast.rs b/crates/net/network/benches/broadcast.rs index 5edac907cbb9..27a41278dbd7 100644 --- a/crates/net/network/benches/broadcast.rs +++ b/crates/net/network/benches/broadcast.rs @@ -6,7 +6,6 @@ use alloy_primitives::{ use criterion::*; use futures::StreamExt; use pprof::criterion::{Output, PProfProfiler}; -use rand::thread_rng; use reth_network::{test_utils::Testnet, NetworkEventListenerProvider}; use reth_network_api::Peers; use reth_provider::test_utils::{ExtendedAccount, MockEthProvider}; diff --git a/crates/stages/stages/benches/setup/mod.rs b/crates/stages/stages/benches/setup/mod.rs index 4f0111ce0c7d..f0f6acb1f3c7 100644 --- a/crates/stages/stages/benches/setup/mod.rs +++ b/crates/stages/stages/benches/setup/mod.rs @@ -16,7 +16,7 @@ use reth_stages::{ test_utils::{StorageKind, TestStageDB}, }; use reth_testing_utils::generators::{ - self, random_block_range, random_changeset_range, random_contract_account_range, + random_block_range, random_changeset_range, random_contract_account_range, random_eoa_accounts, BlockRangeParams, }; use reth_trie::StateRoot; diff --git a/crates/storage/db/benches/hash_keys.rs b/crates/storage/db/benches/hash_keys.rs index 90f06528dfe6..c9255c6c8a61 100644 --- a/crates/storage/db/benches/hash_keys.rs +++ b/crates/storage/db/benches/hash_keys.rs @@ -8,7 +8,7 @@ use criterion::{ use pprof::criterion::{Output, PProfProfiler}; use proptest::{ arbitrary::Arbitrary, - prelude::{any_with, ProptestConfig}, + prelude::{any_with}, strategy::{Strategy, ValueTree}, test_runner::{Config, RngAlgorithm, TestRng, TestRunner}, }; diff --git a/crates/storage/db/benches/utils.rs b/crates/storage/db/benches/utils.rs index b9a83e291118..62c4dfe6ecb9 100644 --- a/crates/storage/db/benches/utils.rs +++ b/crates/storage/db/benches/utils.rs @@ -13,7 +13,7 @@ use std::{path::Path, sync::Arc}; /// Path where the DB is initialized for benchmarks. #[allow(dead_code)] -pub const BENCH_DB_PATH: &str = "/tmp/reth-benches"; +pub(crate) const BENCH_DB_PATH: &str = "/tmp/reth-benches"; /// Used for `RandomRead` and `RandomWrite` benchmarks. #[allow(dead_code)]