Add tracking for new metrics in CSV (entity_changes
, storage_size
)
#5780
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces tracking for entity count changes and current storage size of entities in BlockStateMetrics.
While the tracking mechanism follows a similar pattern to other metrics (
gas
,op
,read_bytes
,write_bytes
), there's an important distinction in how the newly introduced metricsentity_changes
andstorage_size
values are recorded:entity_count_changes
metric tracks the net change in entity counts per block (e.g., +5 id_1 added, -2 id_2 removed)storage_size
metric tracks the actual current size of stored entities as a live readout. If the entity increases/reduces in size due to a write event, then this metric will reflect the new size of the entity after the write event.For
entity_count_changes
, each block's measurement represents changes that occurred within that block, not cumulative totals or absolute counts. To determine the total number of entities at a given block, these changes would need to be summed across all previous blocks.