package
Benchmark your event loop
npm install loopbenchGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 1 packages.
9.2 kB
Includes dependencies.
Benchmark your event loop, extracted from hapi, hoek, heavy and boom.
To install loopbench, simply use npm:
npm i loopbench --saveSee example.js.
Creates a new instance of loopbench.
Options:
sampleInterval: the interval at which the eventLoop should be
sampled, defaults to 5.limit: the maximum amount of delay that is tollerated before
overLimit becomes true, and the load event is
emitted, defaults to 42.Events:
load, emitted when instance.delay > instance.limitunload, emitted when overLimit goes from true and falseThe delay in milliseconds (and fractions) from the expected run. It might be negative (in older nodes).
The maximum amount of delay that is tollerated before
overLimit becomes true, and the load event is
emitted.
Is true if the instance.delay > instance.limit.
Stops the sampling.
Copyright Matteo Collina 2015-2022, Licensed under MIT.
davidmarkclements
david.mark.clements@gmail.com