log state update duration, lower info threshold for detail logging

This commit is contained in:
Jacek Sieka 2021-06-01 17:33:00 +02:00 committed by zah
parent abe0d7b4ae
commit 0fb02b5206
2 changed files with 5 additions and 3 deletions

View File

@ -199,11 +199,13 @@ proc advanceClearanceState*(dag: ChainDagRef) =
let next = let next =
dag.clearanceState.blck.atSlot(dag.clearanceState.blck.slot + 1) dag.clearanceState.blck.atSlot(dag.clearanceState.blck.slot + 1)
debug "Preparing clearance state for next block", next let startTick = Moment.now()
var cache = StateCache() var cache = StateCache()
updateStateData(dag, dag.clearanceState, next, true, cache) updateStateData(dag, dag.clearanceState, next, true, cache)
debug "Prepared clearance state for next block",
next, updateStateDur = Moment.now() - startTick
proc addRawBlockKnownParent( proc addRawBlockKnownParent(
dag: ChainDAGRef, quarantine: QuarantineRef, dag: ChainDAGRef, quarantine: QuarantineRef,
signedBlock: SignedBeaconBlock, signedBlock: SignedBeaconBlock,

View File

@ -855,7 +855,7 @@ proc updateStateData*(
assignDur assignDur
replayDur replayDur
if (assignDur + replayDur) >= 1.seconds: if (assignDur + replayDur) >= 250.millis:
# This might indicate there's a cache that's not in order or a disk that is # This might indicate there's a cache that's not in order or a disk that is
# too slow - for now, it's here for investigative purposes and the cutoff # too slow - for now, it's here for investigative purposes and the cutoff
# time might need tuning # time might need tuning