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();