|
|
@ -597,6 +597,7 @@ func (rw *rlpxFrameRW) WriteMsg(msg Msg) error { |
|
|
|
if metrics.Enabled && msg.meterCap.Name != "" { // don't meter non-subprotocol messages
|
|
|
|
if metrics.Enabled && msg.meterCap.Name != "" { // don't meter non-subprotocol messages
|
|
|
|
m := fmt.Sprintf("%s/%s/%d/%#02x", egressMeterName, msg.meterCap.Name, msg.meterCap.Version, msg.meterCode) |
|
|
|
m := fmt.Sprintf("%s/%s/%d/%#02x", egressMeterName, msg.meterCap.Name, msg.meterCap.Version, msg.meterCode) |
|
|
|
metrics.GetOrRegisterMeter(m, nil).Mark(int64(msg.meterSize)) |
|
|
|
metrics.GetOrRegisterMeter(m, nil).Mark(int64(msg.meterSize)) |
|
|
|
|
|
|
|
metrics.GetOrRegisterMeter(m+"/packets", nil).Mark(1) |
|
|
|
} |
|
|
|
} |
|
|
|
// write header
|
|
|
|
// write header
|
|
|
|
headbuf := make([]byte, 32) |
|
|
|
headbuf := make([]byte, 32) |
|
|
|