core, ethdb, metrics, p2p: expose various counter metrics for grafana

This commit is contained in:
Péter Szilágyi
2019-06-10 14:21:02 +03:00
parent f9c0e093ed
commit b02958b9c5
15 changed files with 341 additions and 117 deletions

View File

@ -418,9 +418,9 @@ func (l *txPricedList) Put(tx *types.Transaction) {
// Removed notifies the prices transaction list that an old transaction dropped
// from the pool. The list will just keep a counter of stale objects and update
// the heap if a large enough ratio of transactions go stale.
func (l *txPricedList) Removed() {
func (l *txPricedList) Removed(count int) {
// Bump the stale counter, but exit if still too low (< 25%)
l.stales++
l.stales += count
if l.stales <= len(*l.items)/4 {
return
}