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

Transaction metrics #1845

Merged
merged 2 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions common/common_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

var (
messageMetrics *prometheus.CounterVec
peerMetrics *prometheus.GaugeVec
PeerMetrics *prometheus.GaugeVec
)

func init() {
Expand All @@ -19,6 +19,6 @@ func registerMetrics() {
messageMetrics.WithLabelValues("sent")
messageMetrics.WithLabelValues("received")

peerMetrics = metrics_config.NewGaugeVec("PeerGauges", "Track the number of peers connected to this node")
peerMetrics.WithLabelValues("numPeers")
PeerMetrics = metrics_config.NewGaugeVec("PeerGauges", "Track the number of peers connected to this node")
PeerMetrics.WithLabelValues("numPeers")
}
18 changes: 0 additions & 18 deletions core/tx_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -2067,7 +2067,6 @@ func (pool *TxPool) sendersGoroutine() {
}).Error("Go-Quai Panicked")
}
}()
resetMetersTicker := time.NewTicker(time.Minute * 5)
for {
select {
case <-pool.reorgShutdownCh:
Expand All @@ -2080,23 +2079,6 @@ func (pool *TxPool) sendersGoroutine() {
"sender": tx.sender.String(),
}).Debug("Tx already seen in sender cache (reorg?)")
}

case <-resetMetersTicker.C:
// Reset the tx meters every 5 minutes
pendingDiscardMeter.Set(0)
pendingReplaceMeter.Set(0)
pendingRateLimitMeter.Set(0)
pendingNofundsMeter.Set(0)
queuedDiscardMeter.Set(0)
queuedReplaceMeter.Set(0)
queuedRateLimitMeter.Set(0)
queuedNofundsMeter.Set(0)
queuedEvictionMeter.Set(0)
knownTxMeter.Set(0)
validTxMeter.Set(0)
invalidTxMeter.Set(0)
underpricedTxMeter.Set(0)
overflowedTxMeter.Set(0)
}
}
}
Expand Down
Loading
Loading