From 028631e1cb5073dabeec6776b0dbbc701b771183 Mon Sep 17 00:00:00 2001 From: Jian Zhen Date: Tue, 21 Apr 2020 22:50:21 -0700 Subject: [PATCH] adress review feedback --- node/node_handler.go | 4 ++-- p2p/host.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/node/node_handler.go b/node/node_handler.go index 1d6d81090..faa593c5e 100644 --- a/node/node_handler.go +++ b/node/node_handler.go @@ -64,7 +64,7 @@ func (node *Node) HandleMessage(content []byte, sender libp2p_peer.ID) { utils.Logger().Info(). Int64("TotalIn", node.host.GetBandwidthTotals().TotalIn). Float64("RateIn", node.host.GetBandwidthTotals().RateIn). - Msg("Record Receiving Metrics!") + Msg("[metrics][p2p] traffic in in bytes") msgCategory, err := proto.GetMessageCategory(content) if err != nil { @@ -457,7 +457,7 @@ func (node *Node) PostConsensusProcessing( // Clear metrics after one consensus cycle node.host.ResetMetrics() - utils.Logger().Info().Msg("Metrics cleared after one consensus cycle") + utils.Logger().Info().Msg("[metrics][p2p] Reset after 1 consensus cycle") // Update consensus keys at last so the change of leader status doesn't mess up normal flow if len(newBlock.Header().ShardState()) > 0 { diff --git a/p2p/host.go b/p2p/host.go index 8faf88506..8f3ef9b02 100644 --- a/p2p/host.go +++ b/p2p/host.go @@ -180,7 +180,7 @@ func (host *HostV2) SendMessageToGroups(groups []nodeconfig.GroupID, msg []byte) host.logger.Info(). Int64("TotalOut", host.GetBandwidthTotals().TotalOut). Float64("RateOut", host.GetBandwidthTotals().RateOut). - Msg("Record Sending Metrics!") + Msg("[metrics][p2p] traffic out in bytes") return err }