les/vflux/server: fix metrics (#22946)

* les/vflux/server: fix metrics

* les/vflux/server: fix metrics
This commit is contained in:
rjl493456442
2021-10-12 00:49:26 +08:00
committed by GitHub
parent 53b1420ede
commit 088bc34194
3 changed files with 22 additions and 10 deletions

View File

@@ -143,8 +143,10 @@ func NewClientPool(balanceDb ethdb.KeyValueStore, minCap uint64, connectedBias t
if oldState.HasAll(cp.setup.activeFlag) && oldState.HasNone(cp.setup.activeFlag) {
clientDeactivatedMeter.Mark(1)
}
_, connected := cp.Active()
totalConnectedGauge.Update(int64(connected))
activeCount, activeCap := cp.Active()
totalActiveCountGauge.Update(int64(activeCount))
totalActiveCapacityGauge.Update(int64(activeCap))
totalInactiveCountGauge.Update(int64(cp.Inactive()))
})
return cp
}