From 093a3cf2f1a83782e578023857dd368c91650ec5 Mon Sep 17 00:00:00 2001 From: OneNail <OneNail@yeah.net> Date: Thu, 19 May 2022 23:55:45 +0800 Subject: [PATCH] doc: fix errors in Performance hooks doc PR-URL: https://github.com/nodejs/node/pull/43152 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com> --- doc/api/perf_hooks.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/doc/api/perf_hooks.md b/doc/api/perf_hooks.md index 63d17c5f3cbfcc..46c2b58eab7f9d 100644 --- a/doc/api/perf_hooks.md +++ b/doc/api/perf_hooks.md @@ -65,7 +65,7 @@ added: v16.7.0 * `name` {string} If `name` is not provided, removes all `PerformanceMeasure` objects from the -Performance Timeline. If `name` is provided, removes only the named mark. +Performance Timeline. If `name` is provided, removes only the named measure. ### `performance.clearResourceTimings([name])` @@ -196,7 +196,7 @@ changes: * `options` {Object} * `detail` {any} Additional optional detail to include with the mark. * `startTime` {number} An optional timestamp to be used as the mark time. - **Defaults**: `performance.now()`. + **Default**: `performance.now()`. Creates a new `PerformanceMark` entry in the Performance Timeline. A `PerformanceMark` is a subclass of `PerformanceEntry` whose @@ -210,9 +210,7 @@ and can be queried with `performance.getEntries`, observation is performed, the entries should be cleared from the global Performance Timeline manually with `performance.clearMarks`. -### \`performance.markResourceTiming(timingInfo, requestedUrl, initiatorType, - -global, cacheMode)\` +### `performance.markResourceTiming(timingInfo, requestedUrl, initiatorType, global, cacheMode)` <!-- YAML added: v18.2.0