Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

event-loop-lag

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

event-loop-lag - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

11

event-loop-lag.js

@@ -20,5 +20,9 @@

setTimeout(check, ms).unref();
var timeout = setTimeout(check, ms);
timeout.unref();
function check(){
// workaround for https://github.com/joyent/node/issues/8364
clearTimeout(timeout);
// how much time has actually elapsed in the loop beyond what

@@ -29,5 +33,8 @@ // setTimeout says is supposed to happen

start = t;
setTimeout(check, ms).unref();
timeout = setTimeout(check, ms)
timeout.unref();
}
// return the loop delay in milliseconds
return function() {

@@ -34,0 +41,0 @@ return delay;

1.0.2 / 2014-11-26
==================
* fix memory leak caused by unref() #3 [jlai](https://github.com/jlai)
1.0.1 / 2014-09-01

@@ -3,0 +8,0 @@ ==================

2

package.json
{
"name": "event-loop-lag",
"version": "1.0.1",
"version": "1.0.2",
"description": "Measure event loop lag",

@@ -5,0 +5,0 @@ "main": "event-loop-lag.js",

@@ -20,3 +20,3 @@ #event-loop-lag

often to refresh the event loop lag measurement and returns a function
you can call to receive the latest lag measurement.
you can call to receive the latest lag measurement in milliseconds.

@@ -30,3 +30,3 @@ ```js

if ('/lag' == this.url)
this.body = lag();
this.body = lag() + ' milliseconds';
else

@@ -33,0 +33,0 @@ yield next;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc