Skip to content

execution/commitment: commitment metrics as counters, round duration and branch IO bytes - #23589

Queued
awskii wants to merge 6 commits into
mainfrom
awskii/commitment-metrics-redesign
Queued

execution/commitment: commitment metrics as counters, round duration and branch IO bytes#23589
awskii wants to merge 6 commits into
mainfrom
awskii/commitment-metrics-redesign

Conversation

@awskii

@awskii awskii commented Aug 26, 2026

Copy link
Copy Markdown
Member

Stacked on #23588 — review that one first. With the metrics reconnected, this replaces the shape they report in: counters and a histogram instead of gauges holding a rate that was already divided by the log interval. A pre-divided gauge fixes the averaging window at the writer, cannot be re-aggregated across instances, and turns a missed scrape into a lost interval rather than a lost sample. rate() belongs in the query.

Changes

  • Retired the 13 commit_* gauges.
  • Counters: commitment_blocks_total, commitment_txns_total, commitment_keys_total, commitment_folds_total, commitment_unfolds_total, commitment_branch_writes_total, commitment_branch_read_bytes_total, commitment_branch_write_bytes_total; with a kind label, commitment_key_traversals_total{address|storage}, commitment_reads_total{account|storage|branch}, commitment_cache_hits_total and commitment_cache_misses_total.
  • commitment_round_duration_seconds histogram plus commitment_rounds_total, observed once per Process on both engines. Buckets run 1ms to 60s, spanning a fast incremental block through a whale fold.
  • Branch IO is now measured in bytes, not just operations: reads at unfoldBranchNode, writes at both BranchEncoder sites and at the deferred apply. DeferredBranchUpdate.encoded is filled by the merge inside ApplyDeferredBranchUpdates, so the deferred bytes are summed after it returns, not before.
  • Progress.prevCommitment* were read to compute deltas but never rolled forward, so every emission re-sent the cumulative total as if it were the interval's increment. They advance now.

Notes

commitment_keys_total counts distinct keys handed to the trie (updates.Size()); commitment_key_traversals_total counts cell visits. They are different numbers on the parallel engine, which re-walks subtrees on mount+replay: 320 traversals against 80 distinct keys on a 16-account fixture. One counter for both would not be comparable between the two engines, which is why the split exists.

RoundKeys is deliberately not merged between tries — the engine that ran the round owns that number, while a mount worker only sees its own subtree. Merging it multiplied the count by the worker fan-out, giving 320 at four workers for the same 80 keys.

@awskii
awskii requested a lite review from Copilot August 26, 2026 10:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@awskii
awskii marked this pull request as draft August 26, 2026 10:53
Base automatically changed from awskii/commitment-metrics-wiring to main August 26, 2026 12:38
…rics-redesign

# Conflicts:
#	execution/commitment/metrics.go
#	execution/commitment/parallel_metrics_test.go
#	execution/commitment/parallel_mount.go
#	execution/commitment/parallel_patricia_hashed.go
@awskii
awskii marked this pull request as ready for review August 26, 2026 16:29
@AskAlexSharov
AskAlexSharov added this pull request to the merge queue Aug 27, 2026
Any commits made after this event will not be merged.
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 27, 2026
@AskAlexSharov
AskAlexSharov added this pull request to the merge queue Aug 27, 2026
Any commits made after this event will not be merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants