diff options
Diffstat (limited to 'doc/api/perf_hooks.md')
-rw-r--r-- | doc/api/perf_hooks.md | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/doc/api/perf_hooks.md b/doc/api/perf_hooks.md index 1ccf3ee3757..94149c26ff0 100644 --- a/doc/api/perf_hooks.md +++ b/doc/api/perf_hooks.md @@ -25,12 +25,12 @@ doSomeLongRunningProcess(() => { }); ``` -## Class: Performance +## Class: `Performance` <!-- YAML added: v8.5.0 --> -### performance.clearMarks(\[name\]) +### `performance.clearMarks([name])` <!-- YAML added: v8.5.0 --> @@ -40,7 +40,7 @@ added: v8.5.0 If `name` is not provided, removes all `PerformanceMark` objects from the Performance Timeline. If `name` is provided, removes only the named mark. -### performance.mark(\[name\]) +### `performance.mark([name])` <!-- YAML added: v8.5.0 --> @@ -53,7 +53,7 @@ Creates a new `PerformanceMark` entry in the Performance Timeline. A `performanceEntry.duration` is always `0`. Performance marks are used to mark specific significant moments in the Performance Timeline. -### performance.measure(name, startMark, endMark) +### `performance.measure(name, startMark, endMark)` <!-- YAML added: v8.5.0 --> @@ -78,7 +78,7 @@ Performance Timeline or any of the timestamp properties provided by the `PerformanceNodeTiming` class. If the named `endMark` does not exist, an error will be thrown. -### performance.nodeTiming +### `performance.nodeTiming` <!-- YAML added: v8.5.0 --> @@ -88,7 +88,7 @@ added: v8.5.0 An instance of the `PerformanceNodeTiming` class that provides performance metrics for specific Node.js operational milestones. -### performance.now() +### `performance.now()` <!-- YAML added: v8.5.0 --> @@ -98,7 +98,7 @@ added: v8.5.0 Returns the current high resolution millisecond timestamp, where 0 represents the start of the current `node` process. -### performance.timeOrigin +### `performance.timeOrigin` <!-- YAML added: v8.5.0 --> @@ -108,7 +108,7 @@ added: v8.5.0 The [`timeOrigin`][] specifies the high resolution millisecond timestamp at which the current `node` process began, measured in Unix time. -### performance.timerify(fn) +### `performance.timerify(fn)` <!-- YAML added: v8.5.0 --> @@ -141,12 +141,12 @@ obs.observe({ entryTypes: ['function'] }); wrapped(); ``` -## Class: PerformanceEntry +## Class: `PerformanceEntry` <!-- YAML added: v8.5.0 --> -### performanceEntry.duration +### `performanceEntry.duration` <!-- YAML added: v8.5.0 --> @@ -156,7 +156,7 @@ added: v8.5.0 The total number of milliseconds elapsed for this entry. This value will not be meaningful for all Performance Entry types. -### performanceEntry.name +### `performanceEntry.name` <!-- YAML added: v8.5.0 --> @@ -165,7 +165,7 @@ added: v8.5.0 The name of the performance entry. -### performanceEntry.startTime +### `performanceEntry.startTime` <!-- YAML added: v8.5.0 --> @@ -175,7 +175,7 @@ added: v8.5.0 The high resolution millisecond timestamp marking the starting time of the Performance Entry. -### performanceEntry.entryType +### `performanceEntry.entryType` <!-- YAML added: v8.5.0 --> @@ -185,7 +185,7 @@ added: v8.5.0 The type of the performance entry. Currently it may be one of: `'node'`, `'mark'`, `'measure'`, `'gc'`, `'function'`, `'http2'` or `'http'`. -### performanceEntry.kind +### `performanceEntry.kind` <!-- YAML added: v8.5.0 --> @@ -201,14 +201,14 @@ The value may be one of: * `perf_hooks.constants.NODE_PERFORMANCE_GC_INCREMENTAL` * `perf_hooks.constants.NODE_PERFORMANCE_GC_WEAKCB` -## Class: PerformanceNodeTiming extends PerformanceEntry +## Class: `PerformanceNodeTiming extends PerformanceEntry` <!-- YAML added: v8.5.0 --> Provides timing details for Node.js itself. -### performanceNodeTiming.bootstrapComplete +### `performanceNodeTiming.bootstrapComplete` <!-- YAML added: v8.5.0 --> @@ -219,7 +219,7 @@ The high resolution millisecond timestamp at which the Node.js process completed bootstrapping. If bootstrapping has not yet finished, the property has the value of -1. -### performanceNodeTiming.environment +### `performanceNodeTiming.environment` <!-- YAML added: v8.5.0 --> @@ -229,7 +229,7 @@ added: v8.5.0 The high resolution millisecond timestamp at which the Node.js environment was initialized. -### performanceNodeTiming.loopExit +### `performanceNodeTiming.loopExit` <!-- YAML added: v8.5.0 --> @@ -240,7 +240,7 @@ The high resolution millisecond timestamp at which the Node.js event loop exited. If the event loop has not yet exited, the property has the value of -1. It can only have a value of not -1 in a handler of the [`'exit'`][] event. -### performanceNodeTiming.loopStart +### `performanceNodeTiming.loopStart` <!-- YAML added: v8.5.0 --> @@ -251,7 +251,7 @@ The high resolution millisecond timestamp at which the Node.js event loop started. If the event loop has not yet started (e.g., in the first tick of the main script), the property has the value of -1. -### performanceNodeTiming.nodeStart +### `performanceNodeTiming.nodeStart` <!-- YAML added: v8.5.0 --> @@ -261,7 +261,7 @@ added: v8.5.0 The high resolution millisecond timestamp at which the Node.js process was initialized. -### performanceNodeTiming.v8Start +### `performanceNodeTiming.v8Start` <!-- YAML added: v8.5.0 --> @@ -271,9 +271,9 @@ added: v8.5.0 The high resolution millisecond timestamp at which the V8 platform was initialized. -## Class: PerformanceObserver +## Class: `PerformanceObserver` -### new PerformanceObserver(callback) +### `new PerformanceObserver(callback)` <!-- YAML added: v8.5.0 --> @@ -310,13 +310,13 @@ notified about new `PerformanceEntry` instances. The callback receives a `PerformanceObserverEntryList` instance and a reference to the `PerformanceObserver`. -### performanceObserver.disconnect() +### `performanceObserver.disconnect()` <!-- YAML added: v8.5.0 --> Disconnects the `PerformanceObserver` instance from all notifications. -### performanceObserver.observe(options) +### `performanceObserver.observe(options)` <!-- YAML added: v8.5.0 --> @@ -366,7 +366,7 @@ for (let n = 0; n < 3; n++) performance.mark(`test${n}`); ``` -## Class: PerformanceObserverEntryList +## Class: `PerformanceObserverEntryList` <!-- YAML added: v8.5.0 --> @@ -374,7 +374,7 @@ added: v8.5.0 The `PerformanceObserverEntryList` class is used to provide access to the `PerformanceEntry` instances passed to a `PerformanceObserver`. -### performanceObserverEntryList.getEntries() +### `performanceObserverEntryList.getEntries()` <!-- YAML added: v8.5.0 --> @@ -384,7 +384,7 @@ added: v8.5.0 Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`. -### performanceObserverEntryList.getEntriesByName(name\[, type\]) +### `performanceObserverEntryList.getEntriesByName(name[, type])` <!-- YAML added: v8.5.0 --> @@ -398,7 +398,7 @@ with respect to `performanceEntry.startTime` whose `performanceEntry.name` is equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to `type`. -### performanceObserverEntryList.getEntriesByType(type) +### `performanceObserverEntryList.getEntriesByType(type)` <!-- YAML added: v8.5.0 --> @@ -410,7 +410,7 @@ Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime` whose `performanceEntry.entryType` is equal to `type`. -## perf_hooks.monitorEventLoopDelay(\[options\]) +## `perf_hooks.monitorEventLoopDelay([options])` <!-- YAML added: v11.10.0 --> @@ -444,13 +444,13 @@ console.log(h.percentile(50)); console.log(h.percentile(99)); ``` -### Class: Histogram +### Class: `Histogram` <!-- YAML added: v11.10.0 --> Tracks the event loop delay at a given sampling rate. -#### histogram.disable() +#### `histogram.disable()` <!-- YAML added: v11.10.0 --> @@ -460,7 +460,7 @@ added: v11.10.0 Disables the event loop delay sample timer. Returns `true` if the timer was stopped, `false` if it was already stopped. -#### histogram.enable() +#### `histogram.enable()` <!-- YAML added: v11.10.0 --> @@ -470,7 +470,7 @@ added: v11.10.0 Enables the event loop delay sample timer. Returns `true` if the timer was started, `false` if it was already started. -#### histogram.exceeds +#### `histogram.exceeds` <!-- YAML added: v11.10.0 --> @@ -480,7 +480,7 @@ added: v11.10.0 The number of times the event loop delay exceeded the maximum 1 hour event loop delay threshold. -#### histogram.max +#### `histogram.max` <!-- YAML added: v11.10.0 --> @@ -489,7 +489,7 @@ added: v11.10.0 The maximum recorded event loop delay. -#### histogram.mean +#### `histogram.mean` <!-- YAML added: v11.10.0 --> @@ -498,7 +498,7 @@ added: v11.10.0 The mean of the recorded event loop delays. -#### histogram.min +#### `histogram.min` <!-- YAML added: v11.10.0 --> @@ -507,7 +507,7 @@ added: v11.10.0 The minimum recorded event loop delay. -#### histogram.percentile(percentile) +#### `histogram.percentile(percentile)` <!-- YAML added: v11.10.0 --> @@ -517,7 +517,7 @@ added: v11.10.0 Returns the value at the given percentile. -#### histogram.percentiles +#### `histogram.percentiles` <!-- YAML added: v11.10.0 --> @@ -526,14 +526,14 @@ added: v11.10.0 Returns a `Map` object detailing the accumulated percentile distribution. -#### histogram.reset() +#### `histogram.reset()` <!-- YAML added: v11.10.0 --> Resets the collected histogram data. -#### histogram.stddev +#### `histogram.stddev` <!-- YAML added: v11.10.0 --> |