Commit 1b9fdba
process: add process.cpuUsage() - implementation, doc, tests
Add process.cpuUsage() method that returns the user and system
CPU time usage of the current process
PR-URL: #6157
Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>1 parent 2c92a1f commit 1b9fdbaCopy full SHA for 1b9fdba
File tree
Expand file treeCollapse file tree
6 files changed
+204
-0
lines changedOpen diff view settings
Filter options
- doc/api
- lib/internal
- src
- test
- parallel
- pummel
Expand file treeCollapse file tree
6 files changed
+204
-0
lines changedOpen diff view settings
Collapse file
+23Lines changed: 23 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
504 | 504 | |
505 | 505 | |
506 | 506 | |
| 507 | + |
| 508 | + |
| 509 | + |
| 510 | + |
| 511 | + |
| 512 | + |
| 513 | + |
| 514 | + |
| 515 | + |
| 516 | + |
| 517 | + |
| 518 | + |
| 519 | + |
| 520 | + |
| 521 | + |
| 522 | + |
| 523 | + |
| 524 | + |
| 525 | + |
| 526 | + |
| 527 | + |
| 528 | + |
| 529 | + |
507 | 530 | |
508 | 531 | |
509 | 532 | |
|
Collapse file
lib/internal/bootstrap_node.js
Copy file name to clipboardExpand all lines: lib/internal/bootstrap_node.js+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
47 | 47 | |
48 | 48 | |
49 | 49 | |
| 50 | + |
50 | 51 | |
51 | 52 | |
52 | 53 | |
|
Collapse file
+52Lines changed: 52 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
9 | 9 | |
10 | 10 | |
11 | 11 | |
| 12 | + |
12 | 13 | |
13 | 14 | |
14 | 15 | |
| ||
22 | 23 | |
23 | 24 | |
24 | 25 | |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + |
25 | 77 | |
26 | 78 | |
27 | 79 | |
|
Collapse file
+35Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
106 | 106 | |
107 | 107 | |
108 | 108 | |
| 109 | + |
109 | 110 | |
110 | 111 | |
111 | 112 | |
| ||
2220 | 2221 | |
2221 | 2222 | |
2222 | 2223 | |
| 2224 | + |
| 2225 | + |
| 2226 | + |
| 2227 | + |
| 2228 | + |
| 2229 | + |
| 2230 | + |
| 2231 | + |
| 2232 | + |
| 2233 | + |
| 2234 | + |
| 2235 | + |
| 2236 | + |
| 2237 | + |
| 2238 | + |
| 2239 | + |
| 2240 | + |
| 2241 | + |
| 2242 | + |
| 2243 | + |
| 2244 | + |
| 2245 | + |
| 2246 | + |
| 2247 | + |
| 2248 | + |
| 2249 | + |
| 2250 | + |
| 2251 | + |
| 2252 | + |
| 2253 | + |
| 2254 | + |
| 2255 | + |
2223 | 2256 | |
2224 | 2257 | |
2225 | 2258 | |
| ||
3212 | 3245 | |
3213 | 3246 | |
3214 | 3247 | |
| 3248 | + |
| 3249 | + |
3215 | 3250 | |
3216 | 3251 | |
3217 | 3252 | |
|
Collapse file
test/parallel/test-process-cpuUsage.js
Copy file name to clipboard+63Lines changed: 63 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
Collapse file
test/pummel/test-process-cpuUsage.js
Copy file name to clipboard+30Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
0 commit comments