-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat(txpool): add sub-pools length and size metrics #2598
feat(txpool): add sub-pools length and size metrics #2598
Conversation
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #2598 +/- ##
===========================================
- Coverage 71.43% 39.39% -32.05%
===========================================
Files 496 496
Lines 62509 62612 +103
===========================================
- Hits 44656 24665 -19991
- Misses 17853 37947 +20094
Flags with carried forward coverage won't be shown. Click here to find out more.
|
9fae21f
to
51625f7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of the metrics are redundant since Prometheus is more than capable of adding up different series to infer these metrics, so we should eliminate them.
My other comments are mostly around naming; the names themselves don't matter too much but we should avoid terms like "length" and we should be somewhat consistent in the naming of the metrics
Thanks for taking this on!
let stats = self.size(); | ||
self.metrics.total_number_transactions.set(stats.total_transactions as f64); | ||
self.metrics.total_size_bytes.set(stats.total_size as f64); | ||
self.metrics.pending_pool_length.set(stats.pending as f64); | ||
self.metrics.pending_sub_pool_size_bytes.set(stats.pending_size as f64); | ||
self.metrics.basefee_pool_length.set(stats.basefee as f64); | ||
self.metrics.basefee_sub_pool_size_bytes.set(stats.basefee_size as f64); | ||
self.metrics.queued_pool_length.set(stats.queued as f64); | ||
self.metrics.queued_sub_pool_size_bytes.set(stats.queued_size as f64); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is ok cc @mattsse
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems ok!
looks correct
Thanks for the review @onbjerg, it's very instructive! :) |
d9a2ce1
to
8422775
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Description
Add pool and sub-pools (
pending
,basefee
andqueued
) length and size metrics.Closes #2592
Test