Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions crates/evm/evm/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ impl OnStateHook for MeteredStateHook {
// Update the metrics for the number of accounts, storage slots and bytecodes loaded
let accounts = state.keys().len();
let storage_slots = state.values().map(|account| account.storage.len()).sum::<usize>();
let bytecodes = state
.values()
.filter(|account| !account.info.is_empty_code_hash())
.collect::<Vec<_>>()
.len();
let bytecodes = state.values().filter(|account| !account.info.is_empty_code_hash()).count();

self.metrics.accounts_loaded_histogram.record(accounts as f64);
self.metrics.storage_slots_loaded_histogram.record(storage_slots as f64);
Expand Down
Loading