From 5c952f38c95a8dbce8463af86e45cde5f75183a8 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 fe3452871982971..308f2cfc698dac3 100644 --- a/doc/api/perf_hooks.md +++ b/doc/api/perf_hooks.md @@ -1339,6 +1339,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`