diff --git a/gossipsub.go b/gossipsub.go index 31816797..28bb6c33 100644 --- a/gossipsub.go +++ b/gossipsub.go @@ -1296,7 +1296,12 @@ func (gs *GossipSubRouter) heartbeatTimer() { } func (gs *GossipSubRouter) heartbeat() { - defer log.Infow("heartbeat") + start := time.Now() + defer func() { + if dt := time.Since(start); dt > time.Millisecond { + log.Infow("heartbeat done", "took", dt) + } + }() gs.heartbeatTicks++