diff --git a/internal/mempool/mempool.go b/internal/mempool/mempool.go index aff14a1c7..e8a030d08 100644 --- a/internal/mempool/mempool.go +++ b/internal/mempool/mempool.go @@ -886,7 +886,6 @@ func (txmp *TxMempool) insertTx(wtx *WrappedTx) bool { gossipEl := txmp.gossipIndex.PushBack(wtx) wtx.gossipEl = gossipEl - txmp.metrics.InsertedTxs.Add(1) atomic.AddInt64(&txmp.sizeBytes, int64(wtx.Size())) return true } @@ -909,7 +908,6 @@ func (txmp *TxMempool) removeTx(wtx *WrappedTx, removeFromCache bool, shouldReen txmp.gossipIndex.Remove(wtx.gossipEl) wtx.gossipEl.DetachPrev() - txmp.metrics.RemovedTxs.Add(1) atomic.AddInt64(&txmp.sizeBytes, int64(-wtx.Size())) wtx.removeHandler(removeFromCache) diff --git a/internal/mempool/metrics.gen.go b/internal/mempool/metrics.gen.go index cfff9ad4c..c5a44f029 100644 --- a/internal/mempool/metrics.gen.go +++ b/internal/mempool/metrics.gen.go @@ -64,18 +64,6 @@ func PrometheusMetrics(namespace string, labelsAndValues ...string) *Metrics { Name: "recheck_times", Help: "Number of times transactions are rechecked in the mempool.", }, labels).With(labelsAndValues...), - RemovedTxs: prometheus.NewCounterFrom(stdprometheus.CounterOpts{ - Namespace: namespace, - Subsystem: MetricsSubsystem, - Name: "removed_txs", - Help: "Number of removed tx from mempool", - }, labels).With(labelsAndValues...), - InsertedTxs: prometheus.NewCounterFrom(stdprometheus.CounterOpts{ - Namespace: namespace, - Subsystem: MetricsSubsystem, - Name: "inserted_txs", - Help: "Number of txs inserted to mempool", - }, labels).With(labelsAndValues...), } } @@ -89,7 +77,5 @@ func NopMetrics() *Metrics { EvictedTxs: discard.NewCounter(), ExpiredTxs: discard.NewCounter(), RecheckTimes: discard.NewCounter(), - RemovedTxs: discard.NewCounter(), - InsertedTxs: discard.NewCounter(), } } diff --git a/internal/mempool/metrics.go b/internal/mempool/metrics.go index fb68f7918..eb296182d 100644 --- a/internal/mempool/metrics.go +++ b/internal/mempool/metrics.go @@ -49,10 +49,4 @@ type Metrics struct { // Number of times transactions are rechecked in the mempool. RecheckTimes metrics.Counter - - // Number of removed tx from mempool - RemovedTxs metrics.Counter - - // Number of txs inserted to mempool - InsertedTxs metrics.Counter }