Comparing version 2.0.13 to 2.0.15
@@ -7,2 +7,3 @@ var fs = require('fs') | ||
var cpuInfo = null | ||
var Buffer = require('safe-buffer').Buffer | ||
var SIZE = 1024 // if the stat file is bigger then this I'll buy you a drink | ||
@@ -9,0 +10,0 @@ |
@@ -106,7 +106,7 @@ 'use strict' | ||
// time elapsed between calls in seconds | ||
var seconds = Math.abs(hst.etime !== undefined ? etime - hst.etime : etime) | ||
var seconds = Math.abs(hst.elapsed !== undefined ? etime - hst.elapsed : etime) | ||
var cpu = seconds > 0 ? (total / seconds) * 100 : 0 | ||
statistics[pid] = { | ||
cpu: cpu < 0 ? 0 : cpu, | ||
cpu: cpu, | ||
memory: memory, | ||
@@ -113,0 +113,0 @@ ppid: ppid, |
{ | ||
"name": "pidusage", | ||
"version": "2.0.13", | ||
"version": "2.0.15", | ||
"description": "Cross-platform process cpu % and memory usage of a PID", | ||
@@ -30,3 +30,5 @@ "license": "MIT", | ||
}, | ||
"dependencies": {}, | ||
"dependencies": { | ||
"safe-buffer": "^5.1.2" | ||
}, | ||
"devDependencies": { | ||
@@ -33,0 +35,0 @@ "ava": "*", |
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
28242
649
1
+ Addedsafe-buffer@^5.1.2
+ Addedsafe-buffer@5.2.1(transitive)