Skip to content

Commit 5549148

Browse files
committed
common: tweak timer logging
1 parent a84b83b commit 5549148

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/indexer-common/src/sequential-timer.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,16 @@ function logWorkTime(
2424
caller: string | undefined,
2525
milliseconds: number,
2626
) {
27-
const workTimeWarningThreshold = 1000
27+
const workTimeWarningThreshold = 5000
2828
const workTime = Date.now() - workStarted
29-
logger.debug(`timer loop took ${loopTime}ms workTime ${workTime} caller(${caller})`)
30-
if (loopTime > milliseconds + workTimeWarningThreshold) {
29+
if (workTime > milliseconds + workTimeWarningThreshold) {
3130
logger.warn(
32-
'timer work took longer than the sequential timer was configured for (+1s)',
31+
'timer work took longer than the sequential timer was configured for (>5s)',
3332
{
3433
loopTime,
34+
workTime,
3535
milliseconds,
36+
caller,
3637
},
3738
)
3839
}

0 commit comments

Comments
 (0)