Add performance logging for slot signature fill commands.

This commit is contained in:
cheatfate 2023-05-10 15:53:16 +03:00
parent 2d135abc56
commit 7eb49b5948
No known key found for this signature in database
GPG Key ID: 46ADD633A7201F95
1 changed files with 11 additions and 3 deletions

View File

@ -602,7 +602,8 @@ proc pollForSyncCommitteeDuties*(service: DutiesServiceRef,
info "Sync committee duties re-organization", sdap, epoch
alreadyWarned = true
if not(dutyFound):
info "Received new sync committee duty", sdap, epoch
let duty = sdap.data
info "Received new sync committee duty", duty, epoch
res.add((epoch, sdap))
res
@ -651,7 +652,10 @@ proc pollForAttesterDuties*(service: DutiesServiceRef) {.async.} =
if (counts[0].count == 0) and (counts[1].count == 0):
debug "No new attester's duties received", slot = currentSlot
await service.fillAttestationSlotSignatures(@[currentEpoch, nextEpoch])
block:
let moment = Moment.now()
await service.fillAttestationSlotSignatures(@[currentEpoch, nextEpoch])
notice "Slot signatures has been obtained", time = (Moment.now() - moment)
let subscriptions =
block:
@ -730,7 +734,11 @@ proc pollForSyncCommitteeDuties*(service: DutiesServiceRef) {.async.} =
debug "No new sync committee member's duties received",
slot = currentSlot
await service.fillSyncSlotSignatures(epochs)
block:
let moment = Moment.now()
await service.fillSyncSlotSignatures(epochs)
notice "Sync selection proofs has been obtained",
time = (Moment.now() - moment)
let subscriptions =
block: