From 421755d93808e9b07d241e54d6e721e6d472fae6 Mon Sep 17 00:00:00 2001 From: wdvxdr Date: Tue, 22 Feb 2022 13:25:16 +0800 Subject: [PATCH] client: add json tag to statistics --- client/statistics.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/client/statistics.go b/client/statistics.go index 7daf871c..ceb5f7f2 100644 --- a/client/statistics.go +++ b/client/statistics.go @@ -5,14 +5,14 @@ import ( ) type Statistics struct { - PacketReceived atomic.Uint64 - PacketSent atomic.Uint64 - PacketLost atomic.Uint64 - MessageReceived atomic.Uint64 - MessageSent atomic.Uint64 - LastMessageTime atomic.Int64 - DisconnectTimes atomic.Uint32 - LostTimes atomic.Uint32 + PacketReceived atomic.Uint64 `json:"packet_received"` + PacketSent atomic.Uint64 `json:"packet_sent"` + PacketLost atomic.Uint64 `json:"packet_lost"` + MessageReceived atomic.Uint64 `json:"message_received"` + MessageSent atomic.Uint64 `json:"message_sent"` + LastMessageTime atomic.Int64 `json:"last_message_time"` + DisconnectTimes atomic.Uint32 `json:"disconnect_times"` + LostTimes atomic.Uint32 `json:"lost_times"` } func (c *QQClient) GetStatistics() *Statistics {