Skip to content

Commit

Permalink
added slow node logging on crawl finish
Browse files Browse the repository at this point in the history
  • Loading branch information
pieterjan84 committed Mar 13, 2024
1 parent 39264fe commit d488f21
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion seed/nodes.json

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions src/crawl-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,17 @@ export class CrawlState {
this.logger.info(
'Closed ledgers: ' + this.slots.getConfirmedClosedSlotIndexes().length
);
const slowNodes = Array.from(this.peerNodes.values()).filter(
(node) => (node.getMinLagMS() ?? 0) > 2000
);

this.logger.info(
'Slow nodes: ' +
slowNodes.length +
' ' +
slowNodes
.map((node) => truncate(node.publicKey) + ':' + node.getMinLagMS())
.join(', ')
);
}
}

0 comments on commit d488f21

Please sign in to comment.