From 8eb51e9b345412aef9ef28b1e57863758f28564c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Thu, 5 Dec 2024 18:37:31 -0300 Subject: [PATCH] Fix clippy --- replay/src/benchmark.rs | 4 +--- replay/src/main.rs | 9 ++++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/replay/src/benchmark.rs b/replay/src/benchmark.rs index d628676..7904ac9 100644 --- a/replay/src/benchmark.rs +++ b/replay/src/benchmark.rs @@ -2,9 +2,7 @@ use std::{error::Error, fs::File, path::Path, time::Duration}; use blockifier::{ context::BlockContext, - execution::{ - call_info::CallInfo, contract_class::RunnableCompiledClass, entry_point::CallEntryPoint, - }, + execution::{call_info::CallInfo, contract_class::RunnableCompiledClass}, state::{cached_state::CachedState, state_api::StateReader}, transaction::objects::TransactionExecutionInfo, }; diff --git a/replay/src/main.rs b/replay/src/main.rs index 13e9ad4..80b7c91 100644 --- a/replay/src/main.rs +++ b/replay/src/main.rs @@ -1,6 +1,3 @@ -use std::thread; -use std::time::Duration; - use blockifier::state::cached_state::CachedState; use blockifier::state::errors::StateError; use blockifier::transaction::objects::{RevertError, TransactionExecutionInfo}; @@ -21,6 +18,8 @@ use { execute_block_range, fetch_block_range_data, fetch_transaction_data, save_executions, }, std::path::PathBuf, + std::thread, + std::time::Duration, std::{ops::Div, time::Instant}, }; @@ -182,6 +181,10 @@ fn main() { block_range_data }; + // We pause the main thread to differentiate + // caching from benchmarking from within a profiler + thread::sleep(Duration::from_secs(1)); + { let _benchmark_span = info_span!("benchmarking block range").entered();