@@ -53,13 +53,13 @@ added: v8.5.0 |
53 | 53 | If `name` is not provided, removes all `PerformanceMark` objects from the |
54 | 54 | Performance Timeline. If `name` is provided, removes only the named mark. |
55 | 55 |
|
56 | | -### `performance.eventLoopUtilization([util1][,util2])` |
| 56 | +### `performance.eventLoopUtilization([utilization1[, utilization2]])` |
57 | 57 | <!-- YAML |
58 | 58 | added: v14.10.0 |
59 | 59 | --> |
60 | 60 |
|
61 | | -* `util1` {Object} The result of a previous call to `eventLoopUtilization()` |
62 | | -* `util2` {Object} The result of a previous call to `eventLoopUtilization()` |
| 61 | +* `utilization1` {Object} The result of a previous call to `eventLoopUtilization()` |
| 62 | +* `utilization2` {Object} The result of a previous call to `eventLoopUtilization()` |
63 | 63 | prior to `util1` |
64 | 64 | * Returns {Object} |
65 | 65 | * `idle` {number} |
@@ -72,23 +72,23 @@ high resolution milliseconds timer. The `utilization` value is the calculated |
72 | 72 | Event Loop Utilization (ELU). If bootstrapping has not yet finished, the |
73 | 73 | properties have the value of 0. |
74 | 74 |
|
75 | | -`util1` and `util2` are optional parameters. |
| 75 | +`utilization1` and `utilization2` are optional parameters. |
76 | 76 |
|
77 | | -If `util1` is passed then the delta between the current call's `active` and |
78 | | -`idle` times are calculated and returned (similar to [`process.hrtime()`][]). |
79 | | -Likewise the adjusted `utilization` value is calculated. |
| 77 | +If `utilization1` is passed, then the delta between the current call's `active` |
| 78 | +and `idle` times, as well as the corresponding `utilization` value are |
| 79 | +calculated and returned (similar to [`process.hrtime()`][]). |
80 | 80 |
|
81 | | -If `util1` and `util2` are both passed then the calculation adjustments are |
82 | | -done between the two arguments. This is a convenience option because unlike |
83 | | -[`process.hrtime()`][] additional work is done to calculate the ELU. |
| 81 | +If `utilization1` and `utilization2` are both passed, then the delta is |
| 82 | +calculated between the two arguments. This is a convenience option because, |
| 83 | +unlike [`process.hrtime()`][], calculating the ELU is more complex than a |
| 84 | +single subtraction. |
84 | 85 |
|
85 | | -ELU is similar to CPU utilization except that it is calculated using high |
86 | | -precision wall-clock time. It represents the percentage of time the event loop |
87 | | -has spent outside the event loop's event provider (e.g. `epoll_wait`). No other |
88 | | -CPU idle time is taken into consideration. The following is an example of how |
89 | | -a mostly idle process will have a high ELU. |
| 86 | +ELU is similar to CPU utilization, except that it only measures event loop |
| 87 | +statistics and not CPU usage. It represents the percentage of time the event |
| 88 | +loop has spent outside the event loop's event provider (e.g. `epoll_wait`). |
| 89 | +No other CPU idle time is taken into consideration. The following is an example |
| 90 | +of how a mostly idle process will have a high ELU. |
90 | 91 |
|
91 | | -<!-- eslint-skip --> |
92 | 92 | ```js |
93 | 93 | 'use strict'; |
94 | 94 | const { eventLoopUtilization } = require('perf_hooks').performance; |
|