diff options
author | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2019-02-10 03:26:12 +0200 |
---|---|---|
committer | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2019-02-12 05:14:57 +0200 |
commit | 0a4c69a5c5e8ba93b7c9f67d08ef6c859eb1f86a (patch) | |
tree | 64f873b2e91c51ab2927fc1c40a2132e70ecaa65 /doc | |
parent | af83f6af5daf5b91f790cb6b9bf61f1ca566ccd0 (diff) | |
download | android-node-v8-0a4c69a5c5e8ba93b7c9f67d08ef6c859eb1f86a.tar.gz android-node-v8-0a4c69a5c5e8ba93b7c9f67d08ef6c859eb1f86a.tar.bz2 android-node-v8-0a4c69a5c5e8ba93b7c9f67d08ef6c859eb1f86a.zip |
doc: fix some nits in perf_hooks
PR-URL: https://github.com/nodejs/node/pull/26022
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/perf_hooks.md | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/doc/api/perf_hooks.md b/doc/api/perf_hooks.md index d805a0cf9d..dd65c0d0bf 100644 --- a/doc/api/perf_hooks.md +++ b/doc/api/perf_hooks.md @@ -398,14 +398,14 @@ Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime` whose `performanceEntry.entryType` is equal to `type`. -## monitorEventLoopDelay([options]) +## perf_hooks.monitorEventLoopDelay([options]) <!-- YAML added: REPLACEME --> * `options` {Object} * `resolution` {number} The sampling rate in milliseconds. Must be greater - than zero. Defaults to `10`. + than zero. **Default:** `10`. * Returns: {Histogram} Creates a `Histogram` object that samples and reports the event loop delay @@ -421,7 +421,7 @@ detect. const { monitorEventLoopDelay } = require('perf_hooks'); const h = monitorEventLoopDelay({ resolution: 20 }); h.enable(); -// Do something +// Do something. h.disable(); console.log(h.min); console.log(h.max); @@ -459,21 +459,30 @@ Enables the event loop delay sample timer. Returns `true` if the timer was started, `false` if it was already started. #### histogram.exceeds +<!-- YAML +added: REPLACEME +--> -* Value: {number} +* {number} The number of times the event loop delay exceeded the maximum 1 hour event loop delay threshold. #### histogram.max +<!-- YAML +added: REPLACEME +--> -* Value: {number} +* {number} The maximum recorded event loop delay. #### histogram.mean +<!-- YAML +added: REPLACEME +--> -* Value: {number} +* {number} The mean of the recorded event loop delays. @@ -482,19 +491,26 @@ The mean of the recorded event loop delays. added: REPLACEME --> -* Value: {number} +* {number} The minimum recorded event loop delay. #### histogram.percentile(percentile) +<!-- YAML +added: REPLACEME +--> * `percentile` {number} A percentile value between 1 and 100. +* Returns: {number} Returns the value at the given percentile. #### histogram.percentiles +<!-- YAML +added: REPLACEME +--> -* Value: {Map} +* {Map} Returns a `Map` object detailing the accumulated percentile distribution. @@ -506,8 +522,11 @@ added: REPLACEME Resets the collected histogram data. #### histogram.stddev +<!-- YAML +added: REPLACEME +--> -* Value: {number} +* {number} The standard deviation of the recorded event loop delays. |