Skip to content

Add metrics for trie log pruner#7352

Merged
siladu merged 2 commits intobesu-eth:mainfrom
siladu:trie-log-pruner-metrics
Jul 18, 2024
Merged

Add metrics for trie log pruner#7352
siladu merged 2 commits intobesu-eth:mainfrom
siladu:trie-log-pruner-metrics

Conversation

@siladu
Copy link
Copy Markdown
Contributor

@siladu siladu commented Jul 18, 2024

PR description

Add 3 counters, can be referenced in grafana with:
besu_pruner_trie_log_added_to_prune_queue_total
besu_pruner_trie_log_pruned_from_queue_total
besu_pruner_trie_log_pruned_trie_log_pruned_orphan_total

Fixed Issue(s)

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests

siladu added 2 commits July 18, 2024 19:36
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
@siladu siladu enabled auto-merge (squash) July 18, 2024 10:52
Copy link
Copy Markdown
Contributor

@garyschulte garyschulte left a comment

Choose a reason for hiding this comment

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

implementation LGTM, metric naming feedback, non-blocking

Comment on lines +80 to +83
BesuMetricCategory.PRUNER, "trie_log_pruned_from_queue", "trie log pruned from queue");
this.prunedOrphanCounter =
metricsSystem.createCounter(
BesuMetricCategory.PRUNER, "trie_log_pruned_orphan", "trie log pruned orphan");
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.

these metric names are only meaningful if you already understand the trie log pruning implementation. I would suggest trie_log_pruned_head and trie_log_pruned_forks

even that implies an understanding of canonical chain and forks. but I had to look at the code to figure out what we meant by _orphan and _queue.

yay, naming feedback.

@siladu siladu merged commit 7a905f8 into besu-eth:main Jul 18, 2024
@siladu siladu deleted the trie-log-pruner-metrics branch July 18, 2024 20:44
gconnect pushed a commit to gconnect/besu that referenced this pull request Aug 26, 2024
---------

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: gconnect <agatevureglory@gmail.com>
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.

2 participants