Skip to content

Commit 90d067c

Browse files
TrottMylesBorins
authored andcommitted
doc,perf_hooks: use code markup/markdown in headers
Backport-PR-URL: #31108 PR-URL: #31086 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 2fe0f90 commit 90d067c

File tree

1 file changed

+41
-41
lines changed

1 file changed

+41
-41
lines changed

doc/api/perf_hooks.md

+41-41
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ doSomeLongRunningProcess(() => {
2525
});
2626
```
2727

28-
## Class: Performance
28+
## Class: `Performance`
2929
<!-- YAML
3030
added: v8.5.0
3131
-->
3232

33-
### performance.clearMarks(\[name\])
33+
### `performance.clearMarks([name])`
3434
<!-- YAML
3535
added: v8.5.0
3636
-->
@@ -40,7 +40,7 @@ added: v8.5.0
4040
If `name` is not provided, removes all `PerformanceMark` objects from the
4141
Performance Timeline. If `name` is provided, removes only the named mark.
4242

43-
### performance.mark(\[name\])
43+
### `performance.mark([name])`
4444
<!-- YAML
4545
added: v8.5.0
4646
-->
@@ -53,7 +53,7 @@ Creates a new `PerformanceMark` entry in the Performance Timeline. A
5353
`performanceEntry.duration` is always `0`. Performance marks are used
5454
to mark specific significant moments in the Performance Timeline.
5555

56-
### performance.measure(name, startMark, endMark)
56+
### `performance.measure(name, startMark, endMark)`
5757
<!-- YAML
5858
added: v8.5.0
5959
-->
@@ -78,7 +78,7 @@ Performance Timeline or any of the timestamp properties provided by the
7878
`PerformanceNodeTiming` class. If the named `endMark` does not exist, an
7979
error will be thrown.
8080

81-
### performance.nodeTiming
81+
### `performance.nodeTiming`
8282
<!-- YAML
8383
added: v8.5.0
8484
-->
@@ -88,7 +88,7 @@ added: v8.5.0
8888
An instance of the `PerformanceNodeTiming` class that provides performance
8989
metrics for specific Node.js operational milestones.
9090

91-
### performance.now()
91+
### `performance.now()`
9292
<!-- YAML
9393
added: v8.5.0
9494
-->
@@ -98,7 +98,7 @@ added: v8.5.0
9898
Returns the current high resolution millisecond timestamp, where 0 represents
9999
the start of the current `node` process.
100100

101-
### performance.timeOrigin
101+
### `performance.timeOrigin`
102102
<!-- YAML
103103
added: v8.5.0
104104
-->
@@ -108,7 +108,7 @@ added: v8.5.0
108108
The [`timeOrigin`][] specifies the high resolution millisecond timestamp at
109109
which the current `node` process began, measured in Unix time.
110110

111-
### performance.timerify(fn)
111+
### `performance.timerify(fn)`
112112
<!-- YAML
113113
added: v8.5.0
114114
-->
@@ -141,12 +141,12 @@ obs.observe({ entryTypes: ['function'] });
141141
wrapped();
142142
```
143143

144-
## Class: PerformanceEntry
144+
## Class: `PerformanceEntry`
145145
<!-- YAML
146146
added: v8.5.0
147147
-->
148148

149-
### performanceEntry.duration
149+
### `performanceEntry.duration`
150150
<!-- YAML
151151
added: v8.5.0
152152
-->
@@ -156,7 +156,7 @@ added: v8.5.0
156156
The total number of milliseconds elapsed for this entry. This value will not
157157
be meaningful for all Performance Entry types.
158158

159-
### performanceEntry.name
159+
### `performanceEntry.name`
160160
<!-- YAML
161161
added: v8.5.0
162162
-->
@@ -165,7 +165,7 @@ added: v8.5.0
165165

166166
The name of the performance entry.
167167

168-
### performanceEntry.startTime
168+
### `performanceEntry.startTime`
169169
<!-- YAML
170170
added: v8.5.0
171171
-->
@@ -175,7 +175,7 @@ added: v8.5.0
175175
The high resolution millisecond timestamp marking the starting time of the
176176
Performance Entry.
177177

178-
### performanceEntry.entryType
178+
### `performanceEntry.entryType`
179179
<!-- YAML
180180
added: v8.5.0
181181
-->
@@ -185,7 +185,7 @@ added: v8.5.0
185185
The type of the performance entry. Currently it may be one of: `'node'`,
186186
`'mark'`, `'measure'`, `'gc'`, `'function'`, `'http2'` or `'http'`.
187187

188-
### performanceEntry.kind
188+
### `performanceEntry.kind`
189189
<!-- YAML
190190
added: v8.5.0
191191
-->
@@ -201,14 +201,14 @@ The value may be one of:
201201
* `perf_hooks.constants.NODE_PERFORMANCE_GC_INCREMENTAL`
202202
* `perf_hooks.constants.NODE_PERFORMANCE_GC_WEAKCB`
203203

204-
## Class: PerformanceNodeTiming extends PerformanceEntry
204+
## Class: `PerformanceNodeTiming extends PerformanceEntry`
205205
<!-- YAML
206206
added: v8.5.0
207207
-->
208208

209209
Provides timing details for Node.js itself.
210210

211-
### performanceNodeTiming.bootstrapComplete
211+
### `performanceNodeTiming.bootstrapComplete`
212212
<!-- YAML
213213
added: v8.5.0
214214
-->
@@ -219,7 +219,7 @@ The high resolution millisecond timestamp at which the Node.js process
219219
completed bootstrapping. If bootstrapping has not yet finished, the property
220220
has the value of -1.
221221

222-
### performanceNodeTiming.environment
222+
### `performanceNodeTiming.environment`
223223
<!-- YAML
224224
added: v8.5.0
225225
-->
@@ -229,7 +229,7 @@ added: v8.5.0
229229
The high resolution millisecond timestamp at which the Node.js environment was
230230
initialized.
231231

232-
### performanceNodeTiming.loopExit
232+
### `performanceNodeTiming.loopExit`
233233
<!-- YAML
234234
added: v8.5.0
235235
-->
@@ -240,7 +240,7 @@ The high resolution millisecond timestamp at which the Node.js event loop
240240
exited. If the event loop has not yet exited, the property has the value of -1.
241241
It can only have a value of not -1 in a handler of the [`'exit'`][] event.
242242

243-
### performanceNodeTiming.loopStart
243+
### `performanceNodeTiming.loopStart`
244244
<!-- YAML
245245
added: v8.5.0
246246
-->
@@ -251,7 +251,7 @@ The high resolution millisecond timestamp at which the Node.js event loop
251251
started. If the event loop has not yet started (e.g., in the first tick of the
252252
main script), the property has the value of -1.
253253

254-
### performanceNodeTiming.nodeStart
254+
### `performanceNodeTiming.nodeStart`
255255
<!-- YAML
256256
added: v8.5.0
257257
-->
@@ -261,7 +261,7 @@ added: v8.5.0
261261
The high resolution millisecond timestamp at which the Node.js process was
262262
initialized.
263263

264-
### performanceNodeTiming.v8Start
264+
### `performanceNodeTiming.v8Start`
265265
<!-- YAML
266266
added: v8.5.0
267267
-->
@@ -271,9 +271,9 @@ added: v8.5.0
271271
The high resolution millisecond timestamp at which the V8 platform was
272272
initialized.
273273

274-
## Class: PerformanceObserver
274+
## Class: `PerformanceObserver`
275275

276-
### new PerformanceObserver(callback)
276+
### `new PerformanceObserver(callback)`
277277
<!-- YAML
278278
added: v8.5.0
279279
-->
@@ -310,13 +310,13 @@ notified about new `PerformanceEntry` instances. The callback receives a
310310
`PerformanceObserverEntryList` instance and a reference to the
311311
`PerformanceObserver`.
312312

313-
### performanceObserver.disconnect()
313+
### `performanceObserver.disconnect()`
314314
<!-- YAML
315315
added: v8.5.0
316316
-->
317317
Disconnects the `PerformanceObserver` instance from all notifications.
318318

319-
### performanceObserver.observe(options)
319+
### `performanceObserver.observe(options)`
320320
<!-- YAML
321321
added: v8.5.0
322322
-->
@@ -366,15 +366,15 @@ for (let n = 0; n < 3; n++)
366366
performance.mark(`test${n}`);
367367
```
368368

369-
## Class: PerformanceObserverEntryList
369+
## Class: `PerformanceObserverEntryList`
370370
<!-- YAML
371371
added: v8.5.0
372372
-->
373373

374374
The `PerformanceObserverEntryList` class is used to provide access to the
375375
`PerformanceEntry` instances passed to a `PerformanceObserver`.
376376

377-
### performanceObserverEntryList.getEntries()
377+
### `performanceObserverEntryList.getEntries()`
378378
<!-- YAML
379379
added: v8.5.0
380380
-->
@@ -384,7 +384,7 @@ added: v8.5.0
384384
Returns a list of `PerformanceEntry` objects in chronological order
385385
with respect to `performanceEntry.startTime`.
386386

387-
### performanceObserverEntryList.getEntriesByName(name\[, type\])
387+
### `performanceObserverEntryList.getEntriesByName(name[, type])`
388388
<!-- YAML
389389
added: v8.5.0
390390
-->
@@ -398,7 +398,7 @@ with respect to `performanceEntry.startTime` whose `performanceEntry.name` is
398398
equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to
399399
`type`.
400400

401-
### performanceObserverEntryList.getEntriesByType(type)
401+
### `performanceObserverEntryList.getEntriesByType(type)`
402402
<!-- YAML
403403
added: v8.5.0
404404
-->
@@ -410,7 +410,7 @@ Returns a list of `PerformanceEntry` objects in chronological order
410410
with respect to `performanceEntry.startTime` whose `performanceEntry.entryType`
411411
is equal to `type`.
412412

413-
## perf_hooks.monitorEventLoopDelay(\[options\])
413+
## `perf_hooks.monitorEventLoopDelay([options])`
414414
<!-- YAML
415415
added: v11.10.0
416416
-->
@@ -444,13 +444,13 @@ console.log(h.percentile(50));
444444
console.log(h.percentile(99));
445445
```
446446

447-
### Class: Histogram
447+
### Class: `Histogram`
448448
<!-- YAML
449449
added: v11.10.0
450450
-->
451451
Tracks the event loop delay at a given sampling rate.
452452

453-
#### histogram.disable()
453+
#### `histogram.disable()`
454454
<!-- YAML
455455
added: v11.10.0
456456
-->
@@ -460,7 +460,7 @@ added: v11.10.0
460460
Disables the event loop delay sample timer. Returns `true` if the timer was
461461
stopped, `false` if it was already stopped.
462462

463-
#### histogram.enable()
463+
#### `histogram.enable()`
464464
<!-- YAML
465465
added: v11.10.0
466466
-->
@@ -470,7 +470,7 @@ added: v11.10.0
470470
Enables the event loop delay sample timer. Returns `true` if the timer was
471471
started, `false` if it was already started.
472472

473-
#### histogram.exceeds
473+
#### `histogram.exceeds`
474474
<!-- YAML
475475
added: v11.10.0
476476
-->
@@ -480,7 +480,7 @@ added: v11.10.0
480480
The number of times the event loop delay exceeded the maximum 1 hour event
481481
loop delay threshold.
482482

483-
#### histogram.max
483+
#### `histogram.max`
484484
<!-- YAML
485485
added: v11.10.0
486486
-->
@@ -489,7 +489,7 @@ added: v11.10.0
489489

490490
The maximum recorded event loop delay.
491491

492-
#### histogram.mean
492+
#### `histogram.mean`
493493
<!-- YAML
494494
added: v11.10.0
495495
-->
@@ -498,7 +498,7 @@ added: v11.10.0
498498

499499
The mean of the recorded event loop delays.
500500

501-
#### histogram.min
501+
#### `histogram.min`
502502
<!-- YAML
503503
added: v11.10.0
504504
-->
@@ -507,7 +507,7 @@ added: v11.10.0
507507

508508
The minimum recorded event loop delay.
509509

510-
#### histogram.percentile(percentile)
510+
#### `histogram.percentile(percentile)`
511511
<!-- YAML
512512
added: v11.10.0
513513
-->
@@ -517,7 +517,7 @@ added: v11.10.0
517517

518518
Returns the value at the given percentile.
519519

520-
#### histogram.percentiles
520+
#### `histogram.percentiles`
521521
<!-- YAML
522522
added: v11.10.0
523523
-->
@@ -526,14 +526,14 @@ added: v11.10.0
526526

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

529-
#### histogram.reset()
529+
#### `histogram.reset()`
530530
<!-- YAML
531531
added: v11.10.0
532532
-->
533533

534534
Resets the collected histogram data.
535535

536-
#### histogram.stddev
536+
#### `histogram.stddev`
537537
<!-- YAML
538538
added: v11.10.0
539539
-->

0 commit comments

Comments
 (0)