{"_id":"event-loop-delay","_rev":"1284404","name":"event-loop-delay","description":"A minimal overhead event loop delay sampler.","dist-tags":{"latest":"1.1.2"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"time":{"modified":"2026-09-02T21:43:39.000Z","created":"2019-01-03T10:53:14.295Z","1.1.2":"2025-06-11T14:56:53.740Z","1.1.1":"2025-06-11T14:47:53.237Z","1.1.0":"2024-11-18T20:02:05.988Z","1.0.1":"2019-11-18T15:58:45.543Z","1.0.0":"2019-01-03T11:06:59.650Z","0.0.0":"2019-01-03T10:53:14.295Z"},"users":{},"author":{"name":"Mathias Buus","url":"@mafintosh"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/event-loop-delay.git"},"versions":{"1.1.2":{"name":"event-loop-delay","version":"1.1.2","description":"A minimal overhead event loop delay sampler.","main":"index.js","dependencies":{"bare-hrtime":"^2.0.9"},"imports":{"./hrtime":{"bare":"bare-hrtime","default":"./hrtime.js"}},"repository":{"type":"git","url":"git+https://github.com/mafintosh/event-loop-delay.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/event-loop-delay/issues"},"homepage":"https://github.com/mafintosh/event-loop-delay","_id":"event-loop-delay@1.1.2","gitHead":"b24a9cc0c7932035d461092187bc3356c5467178","_nodeVersion":"22.16.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-FyRV0Sz97ZRzdAueQp/E9ziBf6fLl+mDRuLFkbXejRYLhzaDCiLQ0Tir0XbxZE7Dx0iuabHbLv+G0BzbDGy+8Q==","shasum":"f00846f51da493378f248b5176b2e3d96cab92c2","tarball":"http://registry-npm.ywwl.com/event-loop-delay/download/event-loop-delay-1.1.2.tgz","fileCount":6,"unpackedSize":3449,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGbhlVJ2au0VVWgE8okGrkpwMetxuuUoHooiB9UNfxZWAiEAyyVP/hq7gZtralPJ9xJmfiJiEMZ2OFO8T07pQSuiSH4="}],"size":1813,"noattachment":false,"key":"/event-loop-delay/-/event-loop-delay-1.1.2.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/event-loop-delay_1.1.2_1749653813593_0.6835537625874055"},"_hasShrinkwrap":false,"publish_time":1749653813740,"_cnpm_publish_time":1749653813740},"1.1.1":{"name":"event-loop-delay","version":"1.1.1","author":{"url":"@mafintosh","name":"Mathias Buus"},"license":"MIT","_id":"event-loop-delay@1.1.1","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/mafintosh/event-loop-delay","bugs":{"url":"https://github.com/mafintosh/event-loop-delay/issues"},"dist":{"shasum":"badeb00144fa7fa2a4de24c1533ce87e33d3f28a","tarball":"http://registry-npm.ywwl.com/event-loop-delay/download/event-loop-delay-1.1.1.tgz","fileCount":6,"integrity":"sha512-zZhounYbQ6I7GtapA5AVINaMk/4n49xsSnF3U/7L19zMEJ25uID/UcZwK7B0nHbPjzW89Hc3jiWGDHSUXtvUhw==","signatures":[{"sig":"MEUCIENSlrYhPDSdgsZtZrufsuOKZnFPQsFDdwSl23wmJdmvAiEAjzOHq8G6wNecMhYZDPFQ81z5588FpofT9OJ3BBW2XI8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3429,"size":1809,"noattachment":false,"key":"/event-loop-delay/-/event-loop-delay-1.1.1.tgz"},"main":"index.js","gitHead":"fce4f2877565c27d977e740d6394069ae287fc98","imports":{"./hrtime":{"bare":"bare-hrtime","default":"./hrtime.js"}},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"repository":{"url":"git+https://github.com/mafintosh/event-loop-delay.git","type":"git"},"_npmVersion":"10.9.2","description":"A minimal overhead event loop delay sampler.","directories":{},"_nodeVersion":"22.16.0","dependencies":{"bare-hrtime":"^2.0.9"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/event-loop-delay_1.1.1_1749653273053_0.02541672246889526","host":"s3://npm-registry-packages-npm-production"},"publish_time":1749653273237,"_cnpm_publish_time":1749653273237},"1.1.0":{"name":"event-loop-delay","version":"1.1.0","description":"A minimal overhead event loop delay sampler.","main":"index.js","dependencies":{"bare-hrtime":"^2.0.9"},"imports":{"./hrtime":{"bare":"bare-hrtime","default":"./hrtime.js"}},"repository":{"type":"git","url":"git+https://github.com/mafintosh/event-loop-delay.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/event-loop-delay/issues"},"homepage":"https://github.com/mafintosh/event-loop-delay","_id":"event-loop-delay@1.1.0","gitHead":"037100a5c783cc211b9bcf41e6670cc92d57aabe","_nodeVersion":"20.11.1","_npmVersion":"10.7.0","dist":{"integrity":"sha512-2kyV9oJBJFXjfiMXZKQ2KADeGTQtCsVzU6bWwMPcT7rXPk6Xa4qIXYHO16bBETGA642u5hdsbnH6v3f61jn4Rw==","shasum":"da86657d9a17dc911a483398dbb0d3671a647cc6","tarball":"http://registry-npm.ywwl.com/event-loop-delay/download/event-loop-delay-1.1.0.tgz","fileCount":6,"unpackedSize":3365,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHG66rfwxlGbbmbGlHslzZ09+DFBnCVGwKxIivjAGtM3AiAO3arF6F2yjThowp1PdDntRh0le3sJRIamKCNtuGzp9w=="}],"size":1784,"noattachment":false,"key":"/event-loop-delay/-/event-loop-delay-1.1.0.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/event-loop-delay_1.1.0_1731960125812_0.951529502435851"},"_hasShrinkwrap":false,"publish_time":1731960125988,"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_cnpm_publish_time":1731960125988},"1.0.1":{"name":"event-loop-delay","version":"1.0.1","description":"A minimal overhead event loop delay sampler.","main":"index.js","dependencies":{"napi-macros":"^2.0.0","node-gyp-build":"^4.2.0"},"devDependencies":{"prebuildify":"^3.0.4"},"scripts":{"prebuild":"cd native && prebuildify --napi"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/event-loop-delay.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/event-loop-delay/issues"},"homepage":"https://github.com/mafintosh/event-loop-delay","gitHead":"7664c3e80047d69416ba894dc367ba4014798721","_id":"event-loop-delay@1.0.1","_nodeVersion":"12.13.0","_npmVersion":"6.12.1","dist":{"integrity":"sha512-O7nq//Wqk2gY8IWqrQHJtlzT/Hbsn0alxX09J0RZ5Bljsfvd+xRtGGnurh+BFatzkNkGi5Ddd/vsA0v2K79g0A==","shasum":"c0e7e30a37e3ce77b1a179a23bee72cf34bcec9f","tarball":"http://registry-npm.ywwl.com/event-loop-delay/download/event-loop-delay-1.0.1.tgz","fileCount":13,"unpackedSize":53764,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0r+1CRA9TVsSAnZWagAAVR0P/1TmTUJWBvztCG380CK1\nVF+vpgFpyUy7vL7nzr/6Z31simfntFmZtSjTH3MGhYsITPztSDaQPT7vMDSl\nyXLK2szIvB3hx6ODkoD7IXONyImJ0PBFJzgwp3SJ/3RpBNk/EvXhVs5UqAxa\n8tvFi+4UTV7/5T9v+BNwjcWB0L+yGQUiSDKNq6dBnhpb44ZXa5+RV/SHtLBR\n1RgqugIv4fD3WMjXokfk6K0JxZ8hqlnXunMTQwHRBijxNwxdOnr4U5CjBszZ\nrET1plm+T6Ltbcc92ME4wHrU3L73qkx1nYegnR3FfrzPjBGnRfMxZTXhWgVf\nd4WkdPglCUEAf3ZJ0aMufV/xGHS5LFCPr5rtDKu4SrIAtYkojPZWAUtHbbvE\nbkKr7Bh7+BX9wJCxGJ/LBStHBZC2ZuNu2cpScAMB1RXIZ1v9Hg9i4wuLM79B\nzCp9SGzYylUWiLRbqG4f9Jh8zio+aeeAzb9edyVBTcvg/tYtrQdqcrd9DKIw\nmnHV2DV3h0QBb5JB49Shyv9UPGH/FzMpi3amNcNJ6l/hJfntq5ujeXalOMrw\nTHCGihPovGmiZTUNcei2cUDIymbShHNYU1FQwqZc6lzQE9pd6uKFc8CbiNzL\nxLWhqkDqiaU60br5Omhg2prthp6kEdrBG/YR654hHuRkmD23xxa8qr0rMpD1\n/0So\r\n=cvyP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCH1MZ2pIz0JYQL6S9mztTx+2Vp0hksyXK02D7WCtUWmgCIQD7ARAbVTmLny1mRAtp4wDTZ3+V2RLBOsDzDmX9KSnlJA=="}],"size":9143,"noattachment":false,"key":"/event-loop-delay/-/event-loop-delay-1.0.1.tgz"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/event-loop-delay_1.0.1_1574092725414_0.8774126278935479"},"_hasShrinkwrap":false,"publish_time":1574092725543,"_cnpm_publish_time":1574092725543},"1.0.0":{"name":"event-loop-delay","version":"1.0.0","description":"A minimal overhead event loop delay sampler.","main":"index.js","dependencies":{"napi-macros":"^1.8.2","node-gyp-build":"^3.7.0"},"devDependencies":{"prebuildify":"^2.10.0"},"scripts":{"prebuild":"cd native && prebuildify --napi"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/event-loop-delay.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/event-loop-delay/issues"},"homepage":"https://github.com/mafintosh/event-loop-delay","gitHead":"b3171216216e0134166c6c0599ecfa4f010213ec","_id":"event-loop-delay@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"integrity":"sha512-8YtyeIWHXrvTqlAhv+fmtaGGARmgStbvocERYzrZ3pwhnQULe5PuvMUTjIWw/emxssoaftfHZsJtkeY8xjiXCg==","shasum":"5af6282549494fd0d868c499cbdd33e027978b8c","tarball":"http://registry-npm.ywwl.com/event-loop-delay/download/event-loop-delay-1.0.0.tgz","fileCount":13,"unpackedSize":60306,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcLezUCRA9TVsSAnZWagAAbXgP/2Qc6RNIoF3TPMS8+GA/\nq7zAeozir8eXxL8HuJyjsOShham1+hLg1LO4NJlxcvlg7MAcBgS+zGCqmTnC\nskVqWwwDSTkvsQDDv24E1LEVAuK+C4MVAzbE6ZY6W1gr6PDDYowuJK9G8vdZ\nf6RyH63nnVrY0hTEp/d/J4MOkN73PDKweiU6eY7USJyEiD41F86cFsDdp0VH\npg0c5iFicHjSrzaPTYn8+8Q6Vfw6QdhVJ1B0GrA61xo6evrFrXtiLRwxRZfn\n53r0ougXBdYQy+/UpVTtkWOE+4y2LbGdboxQVu7PK91CAYDogMIoxBcqjh/T\nRQFBsuPCBGh6se3fm5YitgGPlg6X2bOklO/aGxVkpE6asDoXaJX9ZCwx21My\nP/Z6hoXmrBE/Xp2GMmqUXoEEMSj2Gk/57loXEapX/XamuPmRP823i4gxwvzG\nRN27pueSjJjeqydgEAKcChL3kRyraWPKAkgRCu8FQPfB/0snz4hk3zg9gSA5\nh/I8L6WVGNH3JF4r4z0GAnVdm9x6yOZHzoBX/7xbD3zL32TBasModyg7O5Fj\n6q4loTJkf1+RSEcI2F0tv1AGQ70lcbJrZtUZpfqvZ9wTydB+gWNwywfstiEP\nOXzS1ikmKpTXdUEgeHkA2WcM50LWqxbD+o0umCKWEoxo9bu7nqWXXzQJs9za\nowsM\r\n=frAf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDWWeT5jVxigZpMq08QMKxpCO6wxy0lzkZyAK2q47H4VAiEA8IjJZrKFOj+DIYLdB3Vi/jMWFchCXdisDrHmx/9q80w="}],"size":8701,"noattachment":false,"key":"/event-loop-delay/-/event-loop-delay-1.0.0.tgz"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/event-loop-delay_1.0.0_1546513619508_0.11012583960725753"},"_hasShrinkwrap":false,"publish_time":1546513619650,"_cnpm_publish_time":1546513619650},"0.0.0":{"name":"event-loop-delay","version":"0.0.0","description":"A minimal overhead event loop delay sampler.","main":"index.js","dependencies":{"napi-macros":"^1.8.2","node-gyp-build":"^3.7.0"},"devDependencies":{"prebuildify":"^2.10.0"},"scripts":{"prebuild":"cd native && prebuildify --napi"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/event-loop-delay.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/event-loop-delay/issues"},"homepage":"https://github.com/mafintosh/event-loop-delay","_id":"event-loop-delay@0.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"integrity":"sha512-LxFWp9Mm52RUoqhWDmYiPrMwAkbDf6ecjE5oqUFB58SuNQ4ye1eyyiIV5mjZ69B8s5AXIK8FcelAXQyDEv8sAg==","shasum":"4e6e629e72a197ab33fdc02f3fc6b6ceef9e2425","tarball":"http://registry-npm.ywwl.com/event-loop-delay/download/event-loop-delay-0.0.0.tgz","fileCount":11,"unpackedSize":39706,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcLemaCRA9TVsSAnZWagAA6VoP/iphIpORS8SphIXFN4Tz\n8a9UxQo9W5oZZ79/OUNJd2zYSZRzDAx6lcO0txyKnGesjiuLrFwSK9+STaw1\nwTGz1/XPqn9yNAsOgwxbMGM7HcWST6WEXso19YT5x28Yf2nIztE3C8vLeQB0\ni/puuY94UlzuUkJrOs0nE7F6nPZUHBHveeiyVYOnO21yaE/t4muPaLgiY/eQ\nbbd9MZXzB1kYLOdI2D6tioIi/V6lbfx0CJp2/MX2896+pdI+u92Ph+8ypzLj\nI0EPGYvrNkzCzM6UmLLJwheLgqHZaHG448FdFpI4ArNDVmaca9G4Cg0nE2gn\n9QkelnQUzySNYHlIQ4q6Ly6JFwzP0+/Y9eR8qvoLwlUbFZLuu5wAAhjeowT/\npzex5R2PkxFlHXXzXpScCpxXABs3n4niBB1w6yh15fNaq8iZxJyCOzwED/LF\n7lYY0R6NH+Z2opW8FrlybBJLEF6sYj7g/MWS/FfJBsjXMY5cSVA5/bs1SfZZ\nK5gTji4xctDIyx+vnpb9el2fMLBMR4Y2zZdjvte1fD6ot/x77RXIFGeKDN4J\nd5xAywaO3ULykda01D1GfBfllOReCN7j/JI9WzZEmO0SE+J9PBZrm6GA7Ta4\nf/RyIZDub6yFB+o86FKVtYi5vSNIPOr+THMVApvqb2YaBJPL7u4zPkNmvxRj\n7XfP\r\n=sF7a\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmihu021xsCvd15m/NmkP6JiTwBoEZn8RycpImiu4k5gIgaasgEeNyEFtNI/FscOh0GiNu1rb2xUC0yq25pVVKuQQ="}],"size":6620,"noattachment":false,"key":"/event-loop-delay/-/event-loop-delay-0.0.0.tgz"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/event-loop-delay_0.0.0_1546512794187_0.19921760103993646"},"_hasShrinkwrap":false,"publish_time":1546512794295,"_cnpm_publish_time":1546512794295}},"readme":"# event-loop-delay\n\nA minimal overhead event loop delay sampler.\n\n```\nnpm install event-loop-delay\n```\n\n## Usage\n\n``` js\nconst loopDelay = require('event-loop-delay')\n\nconst sampler = loopDelay()\n\nsetInterval(function () {\n  console.log('Accumulated delay in ms is', sampler.delay)\n  console.log('Accumulated times a delay was detected', sampler.times)\n}, 1000)\n\nsetInterval(function () {\n  for (let i = 0; i < 1e7; i++) {\n    // simulate event loop blocking\n  }\n}, 3000)\n```\n\nRunning the above should run the sampler measuring the event loop delay.\n\n## API\n\n#### `sampler = loopDelay()`\n\nMake a new sampler. Will sample the event loop every 10ms.\n\n#### `sampler.delay`\n\nAccumulated event loop delay in ms measured since sampler was created.\n\n#### `sampler.times`\n\nAccumulated times the event loop delay was detected.\n\n#### `sampler.destroy()`\n\nDestroys the sampler.\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/mafintosh/event-loop-delay","bugs":{"url":"https://github.com/mafintosh/event-loop-delay/issues"},"license":"MIT"}