# Standardized Ethereum performance metrics
This document defines a standardized breakdown of `engine_newPayload` performance metrics for ethereum block execution, validation, and the relevant state IO.
The goal is to enable consistent measurement, reporting and comparison across different Ethereum client implementations.
## EVM execution metrics
EVM execution metrics should include the time spent in the following components:
- **Gas accounting**: time spent calculating and deducting gas for both opcodes and precompiled contracts, including constant and dynamic gas costs
- **Stack validation and memory expansion**: time spent validating stack constraints and handling memory growth
- **Opcode execution**: time spent executing EVM opcodes
- **Precompile execution**: time spent executing precompiled contracts
Note that precisely tracking the time spent in each individual component may introduce significant overhead. In practice, reporting the overall EVM execution time is sufficient.
## Block validation metrics
Block validation metrics should include the time spent in the following components:
- **State validation**: time spent on state tree(s) re-merkleization after applying state mutations.
- **account tree merkleization**: time spent on account tree merkleization and comparison. This time must include tree node loading as well as the hash recomputation.
- **storage tree merkleization**: time spent on storage trees merkleization. This time must include tree node loading as well as the hash recomputation.
- **Block component validation**:
- **Receipts hashing**: time spent on receipt list merkleization and hash comparison.
- **Requests hashing**: time spent on request list merkleization and hash comparison (only applied since Prague fork).
- **Bloom filter validation**: time spent on bloom filter construction and comparison.
- **Gas usage validation**: time spent on block gas usage comparsion.
Note reporting the overall block validation time is usually sufficient.
## State read metrics
State read metrics should include the time spent on state data loading, specifically:
- **Account reads**: time spent on account data loading.
- **Storage reads**: time spent on storage data loading.
- **Code reads**: time spent on contract code loading.
What's more, client implementations may additionally report cache statistics for each category, including cache hit, miss and hit ratio.
## State write metrics
State read metrics should include the time spent on state data commit, specifically:
- **Tree commit**: time spent on committing the mutated tree nodes in the account tree and all associated storage trees
- **State commit**: time spent on committing the mutated states including accounts and storage slots
- **Block commit**: time spent on committing the block data
Note reporting the overall state write time is usually sufficient.
## Overall metrics
- **Block number**: the number of the executed block
- **Block hash**: the hash of the executed block
- **Transaction count**: the number of transactions in the block
- **Elapsed**: time spent on executing the block entirely
- **MGasPerSecond**: milli-gas executed per second