p2p: remove MeteredPeerEvent (#20679)

This event was added for the dashboard, but we don't need it anymore
since the dashboard is gone.
This commit is contained in:
Felix Lange
2020-02-17 12:22:15 +01:00
committed by GitHub
parent 26284ec3cc
commit ac72787768
4 changed files with 15 additions and 160 deletions

View File

@ -302,7 +302,8 @@ func (p *Peer) handle(msg Msg) error {
return fmt.Errorf("msg code out of range: %v", msg.Code)
}
if metrics.Enabled {
metrics.GetOrRegisterMeter(fmt.Sprintf("%s/%s/%d/%#02x", MetricsInboundTraffic, proto.Name, proto.Version, msg.Code-proto.offset), nil).Mark(int64(msg.meterSize))
m := fmt.Sprintf("%s/%s/%d/%#02x", ingressMeterName, proto.Name, proto.Version, msg.Code-proto.offset)
metrics.GetOrRegisterMeter(m, nil).Mark(int64(msg.meterSize))
}
select {
case proto.in <- msg: