Event loop lag detector (supervisor)
Usage:
const detector = ; /* * Passed callback will be called every minute. */detectorstart { /* * lagInfo.avg - average lag (ms), don't worry if this value above about 5-15 * lagInfo.count - count of 1-second iteration in 1-minute supervision interval, ideally 60 * lagInfo.max - maximum lag (ms) in 1-minute interval */ // Common use: if lagInfoavg > 100 || lagInfomax > 500 console; }; // ... // detector;