GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: update eventLoopUtilization documentation · nodejs/node@aea3f77

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • perf_hooks.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/perf_hooks.md‎

Copy file name to clipboardExpand all lines: doc/api/perf_hooks.md
+16-16Lines changed: 16 additions & 16 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ added: v8.5.0
5353
If `name` is not provided, removes all `PerformanceMark` objects from the
5454
Performance Timeline. If `name` is provided, removes only the named mark.
5555

56-
### `performance.eventLoopUtilization([util1][,util2])`
56+
### `performance.eventLoopUtilization([utilization1[, utilization2]])`
5757
<!-- YAML
5858
added: v14.10.0
5959
-->
6060

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()`
6363
prior to `util1`
6464
* Returns {Object}
6565
* `idle` {number}
@@ -72,23 +72,23 @@ high resolution milliseconds timer. The `utilization` value is the calculated
7272
Event Loop Utilization (ELU). If bootstrapping has not yet finished, the
7373
properties have the value of 0.
7474

75-
`util1` and `util2` are optional parameters.
75+
`utilization1` and `utilization2` are optional parameters.
7676

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()`][]).
8080

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.
8485

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.
9091

91-
<!-- eslint-skip -->
9292
```js
9393
'use strict';
9494
const { eventLoopUtilization } = require('perf_hooks').performance;

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.