Titanium JIRA Archive
Appcelerator Daemon (DAEMON)

[DAEMON-35] appcd-core: Replace "pidusage" with "process.cpuUsage()"

GitHub Issuen/a
TypeImprovement
PriorityHigh
StatusResolved
ResolutionFixed
Resolution Date2017-02-16T06:48:52.000+0000
Affected Version/sn/a
Fix Version/sAppc Daemon 1.0.0
Componentsappcd-core
Labelsn/a
ReporterChris Barber
AssigneeChris Barber
Created2016-10-31T17:23:53.000+0000
Updated2017-02-17T16:39:33.000+0000

Description

The daemon uses a NPM module called "pidusage" to monitor the CPU usage, but this is no longer necessary since Node 6 includes a built-in process.cpuUsage() function. https://nodejs.org/dist/latest-v6.x/docs/api/process.html#process_process_cpuusage_previousvalue Aside from removing a dependency, it's going to be more efficient to use Node's built-in process.cpuUsage() because "pidusage" relies on file I/O and spawning ps and wmic.

Comments

No comments

JSON Source