Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf_hooks: multiple fixes for Histogram #41153

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
89 changes: 86 additions & 3 deletions doc/api/perf_hooks.md
Expand Up @@ -817,10 +817,11 @@ added:
-->

* `options` {Object}
* `min` {number|bigint} The minimum recordable value. Must be an integer
* `lowest` {number|bigint} The lowest discernible value. Must be an integer
value greater than 0. **Default:** `1`.
* `max` {number|bigint} The maximum recordable value. Must be an integer
value greater than `min`. **Default:** `Number.MAX_SAFE_INTEGER`.
* `highest` {number|bigint} The highest recordable value. Must be an integer
value that is equal to or greater than two times `min`.
**Default:** `Number.MAX_SAFE_INTEGER`.
* `figures` {number} The number of accuracy digits. Must be a number between
`1` and `5`. **Default:** `3`.
* Returns {RecordableHistogram}
Expand Down Expand Up @@ -870,6 +871,26 @@ console.log(h.percentile(99));
added: v11.10.0
-->

### `histogram.count`

<!-- YAML
added: REPLACEME
-->

* {number}

The number of samples recorded by the histogram.

### `histogram.countBigInt`

<!-- YAML
added: REPLACEME
-->

* {bigint}

The number of samples recorded by the histogram.

### `histogram.exceeds`

<!-- YAML
Expand All @@ -881,6 +902,17 @@ added: v11.10.0
The number of times the event loop delay exceeded the maximum 1 hour event
loop delay threshold.

### `histogram.exceedsBigInt`

<!-- YAML
added: REPLACEME
-->

* {bigint}

The number of times the event loop delay exceeded the maximum 1 hour event
loop delay threshold.

### `histogram.max`

<!-- YAML
Expand All @@ -891,6 +923,16 @@ added: v11.10.0

The maximum recorded event loop delay.

### `histogram.maxBigInt`

<!-- YAML
added: REPLACEME
-->

* {bigint}

The maximum recorded event loop delay.

### `histogram.mean`

<!-- YAML
Expand All @@ -911,6 +953,16 @@ added: v11.10.0

The minimum recorded event loop delay.

### `histogram.minBigInt`

<!-- YAML
added: REPLACEME
-->

* {bigint}

The minimum recorded event loop delay.

### `histogram.percentile(percentile)`

<!-- YAML
Expand All @@ -922,6 +974,17 @@ added: v11.10.0

Returns the value at the given percentile.

### `histogram.percentileBigInt(percentile)`

<!-- YAML
added: REPLACEME
-->

* `percentile` {number} A percentile value in the range (0, 100).
* Returns: {bigint}

Returns the value at the given percentile.

### `histogram.percentiles`

<!-- YAML
Expand All @@ -932,6 +995,16 @@ added: v11.10.0

Returns a `Map` object detailing the accumulated percentile distribution.

### `histogram.percentilesBigInt`

<!-- YAML
added: REPLACEME
-->

* {Map}

Returns a `Map` object detailing the accumulated percentile distribution.

### `histogram.reset()`

<!-- YAML
Expand Down Expand Up @@ -990,6 +1063,16 @@ added:
- v14.18.0
-->

### `histogram.add(other)`

<!-- YAML
added: REPLACEME
-->

* `other` {RecordableHistogram}

Adds the values from `other` to this histogram.

### `histogram.record(val)`

<!-- YAML
Expand Down