Skip to content

Commit

Permalink
[p2p] use debug level for p2p metrics data
Browse files Browse the repository at this point in the history
Signed-off-by: Leo Chen <[email protected]>
  • Loading branch information
Leo Chen committed May 13, 2020
1 parent 053ded8 commit 75d5319
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions node/node_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (node *Node) processSkippedMsgTypeByteValue(
func (node *Node) HandleMessage(content []byte, sender libp2p_peer.ID) {
// log in-coming metrics
node.host.LogRecvMessage(content)
utils.Logger().Info().
utils.Logger().Debug().
Int64("TotalIn", node.host.GetBandwidthTotals().TotalIn).
Float64("RateIn", node.host.GetBandwidthTotals().RateIn).
Msg("[metrics][p2p] traffic in in bytes")
Expand Down Expand Up @@ -453,7 +453,7 @@ func (node *Node) PostConsensusProcessing(

// Clear metrics after one consensus cycle
node.host.ResetMetrics()
utils.Logger().Info().Msg("[metrics][p2p] Reset after 1 consensus cycle")
utils.Logger().Debug().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 {
Expand Down
2 changes: 1 addition & 1 deletion p2p/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func (host *HostV2) SendMessageToGroups(groups []nodeconfig.GroupID, msg []byte)
// log out-going metrics
host.metrics.LogSentMessage(int64(len(msg)))
}
host.logger.Info().
host.logger.Debug().
Int64("TotalOut", host.GetBandwidthTotals().TotalOut).
Float64("RateOut", host.GetBandwidthTotals().RateOut).
Msg("[metrics][p2p] traffic out in bytes")
Expand Down

0 comments on commit 75d5319

Please sign in to comment.