Skip to content

Commit

Permalink
doc: add PerformanceObserver buffered document
Browse files Browse the repository at this point in the history
The option `buffered` is not about queueing the `PerformanceEntry`s with
loop or not. The current (and the spec) behavior is different with
Node.js version <= v16.0.0
  • Loading branch information
legendecas committed Jul 25, 2021
1 parent 062f8e3 commit d09b20d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions doc/api/perf_hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,10 @@ changes:
pr-url: https://github.com/nodejs/node/pull/37136
description: Updated to conform to User Timing Level 3. The
buffered option has been removed.
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/39297
description: Updated to conform to Performance Timeline Level 2. The
buffered option has been added back.
-->

* `options` {Object}
Expand All @@ -597,6 +601,10 @@ changes:
* `entryTypes` {string[]} An array of strings identifying the types of
{PerformanceEntry} instances the observer is interested in. If not
provided an error will be thrown.
* `buffered` {boolean} If true, the observer callback is called with a
list global `PerformanceEntry` buffered entries. If false, only
`PerformanceEntry`s created after the time point are sent to the
observer callback. **Default:** `false`.

Subscribes the {PerformanceObserver} instance to notifications of new
{PerformanceEntry} instances identified either by `options.entryTypes`
Expand Down

0 comments on commit d09b20d

Please sign in to comment.