|
@ -240,7 +240,7 @@ func (p *peer) Send(chID byte, msgBytes []byte) bool { |
|
|
} |
|
|
} |
|
|
res := p.mconn.Send(chID, msgBytes) |
|
|
res := p.mconn.Send(chID, msgBytes) |
|
|
if res { |
|
|
if res { |
|
|
p.metrics.PeerSendBytesTotal.With("peer-id", string(p.ID())).Add(float64(len(msgBytes))) |
|
|
|
|
|
|
|
|
p.metrics.PeerSendBytesTotal.With("peer_id", string(p.ID())).Add(float64(len(msgBytes))) |
|
|
} |
|
|
} |
|
|
return res |
|
|
return res |
|
|
} |
|
|
} |
|
@ -255,7 +255,7 @@ func (p *peer) TrySend(chID byte, msgBytes []byte) bool { |
|
|
} |
|
|
} |
|
|
res := p.mconn.TrySend(chID, msgBytes) |
|
|
res := p.mconn.TrySend(chID, msgBytes) |
|
|
if res { |
|
|
if res { |
|
|
p.metrics.PeerSendBytesTotal.With("peer-id", string(p.ID())).Add(float64(len(msgBytes))) |
|
|
|
|
|
|
|
|
p.metrics.PeerSendBytesTotal.With("peer_id", string(p.ID())).Add(float64(len(msgBytes))) |
|
|
} |
|
|
} |
|
|
return res |
|
|
return res |
|
|
} |
|
|
} |
|
@ -330,7 +330,7 @@ func (p *peer) metricsReporter() { |
|
|
sendQueueSize += float64(chStatus.SendQueueSize) |
|
|
sendQueueSize += float64(chStatus.SendQueueSize) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
p.metrics.PeerPendingSendBytes.With("peer-id", string(p.ID())).Set(sendQueueSize) |
|
|
|
|
|
|
|
|
p.metrics.PeerPendingSendBytes.With("peer_id", string(p.ID())).Set(sendQueueSize) |
|
|
case <-p.Quit(): |
|
|
case <-p.Quit(): |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|