Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dev dependencies #172

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/history.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function clear () {
}

module.exports = {
get: get,
set: set,
clear: clear
get,
set,
clear
soyuka marked this conversation as resolved.
Show resolved Hide resolved
}
8 changes: 4 additions & 4 deletions lib/procfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function readProcFile (pid, options, done) {
start: parseFloat(infos[19]) * 1000 / cpuInfo.clockTick,
rss: parseFloat(infos[21]),
uptime: cpuInfo.uptime * 1000,
fd: fd
fd
}

const memory = stat.rss * cpuInfo.pageSize
Expand All @@ -109,12 +109,12 @@ function readProcFile (pid, options, done) {
}

return done(null, {
cpu: cpu,
memory: memory,
cpu,
memory,
ctime: stat.utime + stat.stime,
elapsed: stat.uptime - stat.start,
timestamp: date,
pid: pid,
pid,
ppid: stat.ppid
})
})
Expand Down
10 changes: 5 additions & 5 deletions lib/ps.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ function ps (pids, options, done) {
const cpu = seconds > 0 ? (total / seconds) * 100 : 0

statistics[pid] = {
cpu: cpu,
memory: memory,
ppid: ppid,
pid: pid,
ctime: ctime,
cpu,
memory,
ppid,
pid,
ctime,
elapsed: etime,
timestamp: date
}
Expand Down
12 changes: 6 additions & 6 deletions lib/wmic.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function wmic (pids, options, done) {
let hst = history.get(pid, options.maxage)
if (hst === undefined) {
again = true
hst = { ctime: kerneltime + usertime, uptime: uptime }
hst = { ctime: kerneltime + usertime, uptime }
}

// process usage since last call
Expand All @@ -107,13 +107,13 @@ function wmic (pids, options, done) {
const seconds = uptime - hst.uptime
const cpu = seconds > 0 ? (total / seconds) * 100 : 0

history.set(pid, { ctime: usertime + kerneltime, uptime: uptime }, options.maxage)
history.set(pid, { ctime: usertime + kerneltime, uptime }, options.maxage)

statistics[pid] = {
cpu: cpu,
memory: memory,
ppid: ppid,
pid: pid,
cpu,
memory,
ppid,
pid,
ctime: usertime + kerneltime,
elapsed: date - creation.getTime(),
timestamp: date
Expand Down
Loading