From 77813e042662f2224369cad9aed252e9b03dd2d3 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 24 Dec 2019 12:42:02 -0800 Subject: [PATCH] doc,perf_hooks: use code markup/markdown in headers Backport-PR-URL: https://github.com/nodejs/node/pull/31108 PR-URL: https://github.com/nodejs/node/pull/31086 Reviewed-By: Anna Henningsen Reviewed-By: Ruben Bridgewater --- doc/api/perf_hooks.md | 82 +++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/doc/api/perf_hooks.md b/doc/api/perf_hooks.md index 1ccf3ee37578e3..94149c26ff0a06 100644 --- a/doc/api/perf_hooks.md +++ b/doc/api/perf_hooks.md @@ -25,12 +25,12 @@ doSomeLongRunningProcess(() => { }); ``` -## Class: Performance +## Class: `Performance` -### performance.clearMarks(\[name\]) +### `performance.clearMarks([name])` @@ -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])` @@ -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)` @@ -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` @@ -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()` @@ -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` @@ -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)` @@ -141,12 +141,12 @@ obs.observe({ entryTypes: ['function'] }); wrapped(); ``` -## Class: PerformanceEntry +## Class: `PerformanceEntry` -### performanceEntry.duration +### `performanceEntry.duration` @@ -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` @@ -165,7 +165,7 @@ added: v8.5.0 The name of the performance entry. -### performanceEntry.startTime +### `performanceEntry.startTime` @@ -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` @@ -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` @@ -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` Provides timing details for Node.js itself. -### performanceNodeTiming.bootstrapComplete +### `performanceNodeTiming.bootstrapComplete` @@ -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` @@ -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` @@ -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` @@ -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` @@ -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` @@ -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)` @@ -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()` Disconnects the `PerformanceObserver` instance from all notifications. -### performanceObserver.observe(options) +### `performanceObserver.observe(options)` @@ -366,7 +366,7 @@ for (let n = 0; n < 3; n++) performance.mark(`test${n}`); ``` -## Class: PerformanceObserverEntryList +## Class: `PerformanceObserverEntryList` @@ -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()` @@ -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])` @@ -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)` @@ -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])` @@ -444,13 +444,13 @@ console.log(h.percentile(50)); console.log(h.percentile(99)); ``` -### Class: Histogram +### Class: `Histogram` Tracks the event loop delay at a given sampling rate. -#### histogram.disable() +#### `histogram.disable()` @@ -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()` @@ -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` @@ -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` @@ -489,7 +489,7 @@ added: v11.10.0 The maximum recorded event loop delay. -#### histogram.mean +#### `histogram.mean` @@ -498,7 +498,7 @@ added: v11.10.0 The mean of the recorded event loop delays. -#### histogram.min +#### `histogram.min` @@ -507,7 +507,7 @@ added: v11.10.0 The minimum recorded event loop delay. -#### histogram.percentile(percentile) +#### `histogram.percentile(percentile)` @@ -517,7 +517,7 @@ added: v11.10.0 Returns the value at the given percentile. -#### histogram.percentiles +#### `histogram.percentiles` @@ -526,14 +526,14 @@ added: v11.10.0 Returns a `Map` object detailing the accumulated percentile distribution. -#### histogram.reset() +#### `histogram.reset()` Resets the collected histogram data. -#### histogram.stddev +#### `histogram.stddev`