From 582bed52c36a5999780405ce97688846eef890fa Mon Sep 17 00:00:00 2001 From: skyclouds2001 <95597335+skyclouds2001@users.noreply.github.com> Date: Mon, 25 Nov 2024 18:02:32 +0800 Subject: [PATCH] doc: add doc for PerformanceObserver.takeRecords() PR-URL: https://github.com/nodejs/node/pull/55786 Fixes: https://github.com/nodejs/node/issues/55779 Reviewed-By: James M Snell Reviewed-By: Jason Zhang --- doc/api/perf_hooks.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/api/perf_hooks.md b/doc/api/perf_hooks.md index 4495d23ce12a63..2791790d7f7a7b 100644 --- a/doc/api/perf_hooks.md +++ b/doc/api/perf_hooks.md @@ -1337,6 +1337,14 @@ for (let n = 0; n < 3; n++) performance.mark(`test${n}`); ``` +### `performanceObserver.takeRecords()` + + + +* Returns: {PerformanceEntry\[]} Current list of entries stored in the performance observer, emptying it out. + ## Class: `PerformanceObserverEntryList`