Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions cardano-node/src/Cardano/Node/Tracing/Tracers/Consensus.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE ViewPatterns #-}

Check warning on line 13 in cardano-node/src/Cardano/Node/Tracing/Tracers/Consensus.hs

View workflow job for this annotation

GitHub Actions / build

Warning in module Cardano.Node.Tracing.Tracers.Consensus: Unused LANGUAGE pragma ▫︎ Found: "{-# LANGUAGE ViewPatterns #-}"

{-# OPTIONS_GHC -Wno-orphans #-}

Expand Down Expand Up @@ -2357,7 +2357,7 @@
calculateLeiosMetrics lm@LeiosMetrics {..} _lc (TraceLeiosAnnouncementAccepted _ _ fields (Just annDelay)) =
case announcementElection fields of
MkElId slotNo@(SlotNo slotNo_) _ ->
if Cdf.null lmCdfState
if Cdf.null lmCdfState && annDelay > 20 -- During startup wait until we are in sync
Comment thread
nfrisby marked this conversation as resolved.
then nothingToDo
else
case Cdf.processDataPoint
Expand All @@ -2368,7 +2368,10 @@
of
Nothing -> nothingToDo
Just (lm', lmCdfState') ->
lm' { lmCdfState = lmCdfState'
lm' { lmCdfState = lmCdfState'
, lmTraceIt = True
, lmTraceVars = Cdf.size lmCdfState' >= 45 -- wait until we have at least 45 samples before providing cdf estimates
, lmDelay = realToFrac annDelay
}
where
nothingToDo = lm {lmTraceIt = False}
Expand Down
Loading