This was primarily written to provide accurate event loop statistics for our blog post on the node event loop.
const EventLoopMonitor = require("node-event-loop-stats").EventLoopMonitor;
const monitor = new EventLoopMonitor();
monitor.start();
setInterval(() => {
console.log("Event loop: " + monitor.getStatsString());
}, 1000);