From 81d5061ad59ec8715ef7636a8e62fd48fa416cde Mon Sep 17 00:00:00 2001 From: OneNail 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 Reviewed-By: Zeyu "Alex" Yang --- 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 87240234dfc9ec..160156a39823e7 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)`