Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metrics for trie log pruner #7352

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

siladu
Copy link
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

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
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
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 hyperledger:main Jul 18, 2024
40 checks passed
@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