
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
event-loop-lag
Advanced tools
#event-loop-lag
Measures Node.js event loop lag.
var interval = 1000; // how often to refresh our measurement
var lag = require('event-loop-lag')(interval);
console.log('event loop lag is %d', lag());
event-loop-lag
accepts a number of milliseconds representing how
often to refresh the event loop lag measurement and returns a function
you can call to receive the latest lag measurement in milliseconds.
var lag = require('event-loop-lag')(1000);
var koa = require('koa');
var app = koa();
app.use(function*(next){
if ('/lag' == this.url)
this.body = lag() + ' milliseconds';
else
yield next;
})
npm install event-loop-lag --save
make test
runs testsmake test-cov
runs tests + test coveragemake open-cov
opens test coverage results in your browserevent-loop-lag
supports the debug
module for help during development.
Enable verbose logging by setting your DEBUG
env variable like so:
DEBUG=event-loop-lag* npm test
FAQs
Measure event loop lag
We found that event-loop-lag demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.