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

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.16 to 2.0.17

CHANGELOG.md

1

index.js

@@ -38,1 +38,2 @@ 'use strict'

module.exports = pidusage
module.exports.clear = require('./lib/history').clear

@@ -72,5 +72,19 @@ 'use strict'

function deleteLoop (obj) { for (let i in obj) { delete obj[i] } }
function clear () {
if (interval !== null) {
clearInterval(interval)
interval = null
}
deleteLoop(history)
deleteLoop(expiration)
deleteLoop(expireListeners)
}
module.exports = {
get: get,
set: set
set: set,
clear: clear
}

4

lib/procfile.js

@@ -115,4 +115,4 @@ var fs = require('fs')

ctime: (stat.utime + stat.stime) / cpuInfo.clockTick,
elapsed: date - (stat.start * 1000),
timestamp: stat.start * 1000, // start date
elapsed: (stat.uptime * 1000) - (stat.start * 1000), // process uptime minus start time
timestamp: date,
pid: pid,

@@ -119,0 +119,0 @@ ppid: stat.ppid

{
"name": "pidusage",
"version": "2.0.16",
"version": "2.0.17",
"description": "Cross-platform process cpu % and memory usage of a PID",

@@ -38,3 +38,3 @@ "license": "MIT",

"mockery": "2.1.0",
"nyc": "^13.0.0",
"nyc": "13.0.0",
"pify": "^3.0.0",

@@ -41,0 +41,0 @@ "standard": "*",

@@ -113,2 +113,6 @@ # pidusage

### pidusage.clear()
If needed this function can be used to clear the event loop. Indeed, we're registering an interval to free up the in-memory metrics. By calling this, it will clear this interval and all delete all in-memory data.
## Related

@@ -115,0 +119,0 @@ - [pidusage-tree][gh:pidusage-tree] -

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