Skip to content

Commit 88fce8d

Browse files
committed
doc: align perf_hooks histogram class name with implementation
align perf_hooks docs after renaming internal ELDHistogram to IterationHistogram
1 parent 62dfe08 commit 88fce8d

1 file changed

Lines changed: 9 additions & 13 deletions

File tree

doc/api/perf_hooks.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1716,7 +1716,7 @@ changes:
17161716
* `resolution` {number} The sampling rate in milliseconds for interval-based
17171717
sampling. Must be greater than zero. This option is ignored when
17181718
`samplePerIteration` is `true`. **Default:** `10`.
1719-
* Returns: {IntervalHistogram|ELDHistogram}
1719+
* Returns: {ELDHistogram}
17201720

17211721
_This property is an extension by Node.js. It is not available in Web browsers._
17221722

@@ -2006,9 +2006,10 @@ added: v11.10.0
20062006

20072007
The standard deviation of the recorded event loop delays.
20082008

2009-
## Class: `IntervalHistogram extends Histogram`
2009+
## Class: `ELDHistogram extends Histogram`
20102010

2011-
A `Histogram` that records event loop delay using interval-based sampling.
2011+
A `Histogram` that records event loop delay, returned by
2012+
[`perf_hooks.monitorEventLoopDelay()`][].
20122013

20132014
### `histogram.disable()`
20142015

@@ -2049,17 +2050,11 @@ const { monitorEventLoopDelay } = require('node:perf_hooks');
20492050
}
20502051
```
20512052

2052-
### Cloning event loop delay histograms
2053-
2054-
{IntervalHistogram} and {ELDHistogram} instances can be cloned via
2055-
{MessagePort}. On the receiving end, the histogram is cloned as a plain
2056-
{Histogram} object that does not implement the `enable()` and `disable()`
2057-
methods.
2058-
2059-
## Class: `ELDHistogram extends Histogram`
2053+
### Cloning an `ELDHistogram`
20602054

2061-
A `Histogram` that records event loop delay once per event loop iteration. It
2062-
provides the same API as {IntervalHistogram}.
2055+
{ELDHistogram} instances can be cloned via {MessagePort}. On the receiving end,
2056+
the histogram is cloned as a plain {Histogram} object that does not implement
2057+
the `enable()` and `disable()` methods.
20632058

20642059
## Class: `RecordableHistogram extends Histogram`
20652060

@@ -2367,6 +2362,7 @@ dns.promises.resolve('localhost');
23672362
[`'exit'`]: process.md#event-exit
23682363
[`child_process.spawnSync()`]: child_process.md#child_processspawnsynccommand-args-options
23692364
[`perf_hooks.eventLoopUtilization()`]: #perf_hookseventlooputilizationutilization1-utilization2
2365+
[`perf_hooks.monitorEventLoopDelay()`]: #perf_hooksmonitoreventloopdelayoptions
23702366
[`perf_hooks.timerify()`]: #perf_hookstimerifyfn-options
23712367
[`process.hrtime()`]: process.md#processhrtimetime
23722368
[`timeOrigin`]: https://w3c.github.io/hr-time/#dom-performance-timeorigin

0 commit comments

Comments
 (0)