mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(revm): rm no longer used BlockExecutorStats (#9830)
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
@ -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
|
||||
|
||||
@ -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::*;
|
||||
|
||||
Reference in New Issue
Block a user