mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-19 14:34:17 +00:00
p2p: metrics (#6278)
This commit is contained in:
+4
-1
@@ -167,6 +167,8 @@ func (s *pqScheduler) process() {
|
||||
timestamp: time.Now().UTC(),
|
||||
}
|
||||
|
||||
s.metrics.PeerPendingSendBytes.With("peer_id", string(pqEnv.envelope.To)).Add(float64(pqEnv.size))
|
||||
|
||||
// enqueue
|
||||
|
||||
// Check if we have sufficient capacity to simply enqueue the incoming
|
||||
@@ -252,6 +254,7 @@ func (s *pqScheduler) process() {
|
||||
s.sizes[uint(s.chDescs[i].Priority)] -= pqEnv.size
|
||||
}
|
||||
|
||||
s.metrics.PeerSendBytesTotal.With("peer_id", string(pqEnv.envelope.To)).Add(float64(pqEnv.size))
|
||||
s.dequeueCh <- pqEnv.envelope
|
||||
}
|
||||
|
||||
@@ -267,7 +270,7 @@ func (s *pqScheduler) push(pqEnv *pqEnvelope) {
|
||||
// enqueue the incoming Envelope
|
||||
heap.Push(s.pq, pqEnv)
|
||||
s.size += pqEnv.size
|
||||
s.metrics.PeerQueueMsgSize.With("ch_id", chIDStr).Set(float64(pqEnv.size))
|
||||
s.metrics.PeerQueueMsgSize.With("ch_id", chIDStr).Add(float64(pqEnv.size))
|
||||
|
||||
// Update the cumulative sizes by adding the Envelope's size to every
|
||||
// priority less than or equal to it.
|
||||
|
||||
Reference in New Issue
Block a user