Node.js · Middle · Question 8 of 75
How do you measure how busy the event loop is?
- 1By counting open files with
fs.stat - ✓Correct answer: With
perf_hooks.monitorEventLoopDelay()orperformance.eventLoopUtilization() - 3By reading
process.uptime()
Explanation
Event loop delay and utilization are key metrics for a Node.js service. High delay means callbacks wait long before running, which users feel as latency.