event-loop-lag
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -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 @@ ================== |
{ | ||
"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; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6634
90