Skip to content

Commit

Permalink
Revert "Add metrics for mempool size changes (#220)"
Browse files Browse the repository at this point in the history
This reverts commit e250648.
  • Loading branch information
stevenlanders committed Apr 11, 2024
1 parent 77be42f commit e615257
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 22 deletions.
2 changes: 0 additions & 2 deletions internal/mempool/mempool.go
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,6 @@ func (txmp *TxMempool) insertTx(wtx *WrappedTx, updatePriorityIndex bool) bool {
gossipEl := txmp.gossipIndex.PushBack(wtx)
wtx.gossipEl = gossipEl

txmp.metrics.InsertedTxs.Add(1)
atomic.AddInt64(&txmp.sizeBytes, int64(wtx.Size()))
return true
}
Expand All @@ -912,7 +911,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)
Expand Down
14 changes: 0 additions & 14 deletions internal/mempool/metrics.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions internal/mempool/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit e615257

Please sign in to comment.