chore(revm): rm no longer used BlockExecutorStats (#9830)

Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
Delweng
2024-07-26 23:33:43 +08:00
committed by GitHub
parent 5688739499
commit 87564bd17e
5 changed files with 5 additions and 58 deletions

View File

@ -28,9 +28,6 @@ revm.workspace = true
# alloy
alloy-eips.workspace = true
# common
tracing.workspace = true
[dev-dependencies]
reth-trie.workspace = true
reth-ethereum-forks.workspace = true

View File

@ -4,12 +4,10 @@ use crate::{
precompile::{Address, HashSet},
primitives::alloy_primitives::BlockNumber,
};
use core::time::Duration;
use reth_execution_errors::BlockExecutionError;
use reth_primitives::{Receipt, Receipts, Request, Requests};
use reth_prune_types::{PruneMode, PruneModes, PruneSegmentError, MINIMUM_PRUNING_DISTANCE};
use revm::db::states::bundle_state::BundleRetention;
use tracing::debug;
#[cfg(not(feature = "std"))]
use alloc::vec::Vec;
@ -182,37 +180,6 @@ impl BlockBatchRecord {
}
}
/// Block execution statistics. Contains duration of each step of block execution.
#[derive(Clone, Debug, Default)]
pub struct BlockExecutorStats {
/// Execution duration.
pub execution_duration: Duration,
/// Time needed to apply output of revm execution to revm cached state.
pub apply_state_duration: Duration,
/// Time needed to apply post execution state changes.
pub apply_post_execution_state_changes_duration: Duration,
/// Time needed to merge transitions and create reverts.
/// It this time transitions are applies to revm bundle state.
pub merge_transitions_duration: Duration,
/// Time needed to calculate receipt roots.
pub receipt_root_duration: Duration,
}
impl BlockExecutorStats {
/// Log duration to debug level log.
pub fn log_debug(&self) {
debug!(
target: "evm",
evm_transact = ?self.execution_duration,
apply_state = ?self.apply_state_duration,
apply_post_state = ?self.apply_post_execution_state_changes_duration,
merge_transitions = ?self.merge_transitions_duration,
receipt_root = ?self.receipt_root_duration,
"Execution time"
);
}
}
#[cfg(test)]
mod tests {
use super::*;