Skip to content

core/txpool: add some txpool metrics #505

Merged
tungng98 merged 8 commits intoBuildOnViction:pre-releasefrom
c98tristan:feat/add-txpool-metrics
Mar 21, 2025
Merged

core/txpool: add some txpool metrics #505
tungng98 merged 8 commits intoBuildOnViction:pre-releasefrom
c98tristan:feat/add-txpool-metrics

Conversation

@c98tristan
Copy link
Copy Markdown
Contributor

This pull request includes several changes to replace the use of counters with meters for transaction metrics in the lending pool, order pool, and transaction pool. The most important changes include modifying various methods to use meters instead of counters and updating the metric definitions.

Metrics Update:

  • core/tx_pool.go: Replaced counters with meters for various transaction metrics, including pendingDiscardMeter, pendingReplaceMeter, queuedDiscardMeter, and invalidTxMeter. Added new gauges for pendingGauge, queuedGauge, and localGauge. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
# TYPE txpool_invalid gauge
txpool_invalid 19

# TYPE txpool_local gauge
txpool_local 0

# TYPE txpool_pending gauge
txpool_pending 6

# TYPE txpool_pending_discard gauge
txpool_pending_discard 0

# TYPE txpool_pending_nofunds gauge
txpool_pending_nofunds 0

# TYPE txpool_pending_ratelimit gauge
txpool_pending_ratelimit 0

# TYPE txpool_pending_replace gauge
txpool_pending_replace 0

# TYPE txpool_queued gauge
txpool_queued 0

# TYPE txpool_queued_discard gauge
txpool_queued_discard 0

# TYPE txpool_queued_nofunds gauge
txpool_queued_nofunds 0

# TYPE txpool_queued_ratelimit gauge
txpool_queued_ratelimit 0

# TYPE txpool_queued_replace gauge
txpool_queued_replace 0

# TYPE txpool_underpriced gauge
txpool_underpriced 0

# TYPE txpool_valid gauge
txpool_valid 7763

Reference:

@c98tristan c98tristan marked this pull request as draft February 14, 2025 11:29
@c98tristan c98tristan marked this pull request as ready for review February 27, 2025 10:33
@tungng98 tungng98 merged commit 9c83c4c into BuildOnViction:pre-release Mar 21, 2025
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