Socket
Socket
Sign inDemoInstall

pidusage

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pidusage - npm Package Compare versions

Comparing version 2.0.13 to 2.0.15

1

lib/procfile.js

@@ -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 @@

4

lib/ps.js

@@ -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": "*",

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