From ed10349f451e96cf671d270545c99ff0041fea7c Mon Sep 17 00:00:00 2001 From: ilylia Date: Tue, 26 Mar 2019 06:42:16 +0800 Subject: [PATCH] stats: add WireLength to stats.InPayload (#2692) (#2711) --- stream.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/stream.go b/stream.go index 38b90a65..c0616ce8 100644 --- a/stream.go +++ b/stream.go @@ -881,8 +881,9 @@ func (a *csAttempt) recvMsg(m interface{}, payInfo *payloadInfo) (err error) { RecvTime: time.Now(), Payload: m, // TODO truncate large payload. - Data: payInfo.uncompressedBytes, - Length: len(payInfo.uncompressedBytes), + Data: payInfo.uncompressedBytes, + WireLength: payInfo.wireLength, + Length: len(payInfo.uncompressedBytes), }) } if channelz.IsOn() { @@ -1467,8 +1468,9 @@ func (ss *serverStream) RecvMsg(m interface{}) (err error) { RecvTime: time.Now(), Payload: m, // TODO truncate large payload. - Data: payInfo.uncompressedBytes, - Length: len(payInfo.uncompressedBytes), + Data: payInfo.uncompressedBytes, + WireLength: payInfo.wireLength, + Length: len(payInfo.uncompressedBytes), }) } if ss.binlog != nil {