Adding CPU and I/O metrics to process module
This commit is contained in:
parent
70e199e255
commit
8a5aa04756
5 changed files with 84 additions and 0 deletions
|
@ -116,3 +116,15 @@ Returns `Object`:
|
|||
|
||||
Returns an object giving memory usage statistics about the entire system. Note
|
||||
that all statistics are reported in Kilobytes.
|
||||
|
||||
### `process.getCPUUsage()`
|
||||
|
||||
Returns:
|
||||
|
||||
* `CPUUsage` [CPUUsage](structures/cpu-usage.md)
|
||||
|
||||
### `process.getIOCounters()`
|
||||
|
||||
Returns:
|
||||
|
||||
* `IOCounters` [IOCounters](structures/io-counters.md)
|
6
docs/api/structures/cpu-usage.md
Normal file
6
docs/api/structures/cpu-usage.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
# CPUUsage Object
|
||||
|
||||
* `percentCPUUsage` number - Percentage of CPU used since the last call to getCPUUsage.
|
||||
First call returns 0.
|
||||
* `idleWakeupsPerSecond` number - The number of average idle cpu wakeups per second
|
||||
since the last call to getCPUUsage. First call returns 0.
|
8
docs/api/structures/io-counters.md
Normal file
8
docs/api/structures/io-counters.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
# IOCounters Object
|
||||
|
||||
* `readOperationCount` Number - The number of I/O read operations.
|
||||
* `writeOperationCount` Number - The number of I/O write operations.
|
||||
* `otherOperationCount` Number - Then number of I/O other operations.
|
||||
* `readTransferCount` Number - The number of I/O read transfers.
|
||||
* `writeTransferCount` Number - The number of I/O write transfers.
|
||||
* `otherTransferCount` Number - Then number of I/O other transfers.
|
Loading…
Add table
Add a link
Reference in a new issue