express.eventloop.lag.mean
Mean event loop lagDimensions:None
Available on:
Prometheus (1)
Interface Metrics (1)
Technical Annotations (14)
Configuration Parameters (2)
thresholdrecommended: 100resolutionrecommended: 10CLI Commands (4)
function processInChunks(data, chunkSize = 1000) { let index = 0; function nextChunk() { const end = Math.min(index + chunkSize, data.length); for (; index < end; index++) { processData(data[index]); } if (index < data.length) { setImmediate(nextChunk); } } nextChunk(); }remediationclinic doctor -- node your-app.jsdiagnosticconst { monitorEventLoopDelay } = require('perf_hooks'); const h = monitorEventLoopDelay(); h.enable(); setInterval(() => { console.log(`Event Loop Lag: ${Math.round(h.mean / 1e6)} ms`); }, 1000);monitoringnode --inspect app.jsdiagnosticTechnical References (8)
perf_hookscomponentmonitorEventLoopDelaycomponentsetImmediatecomponentsetTimeoutcomponentevent loopconceptclinic.jscomponentclinic doctorcomponentblocked-atcomponentRelated Insights (4)
Event loop blocking causes complete application unresponsivenesscritical
▸
Synchronous loops block event loop causing application unresponsivenesscritical
▸
Event loop lag detection requires monitoring toolinginfo
▸
Event loop lag exceeding 50ms indicates blocking operationswarning
▸