You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/utils/src/lib/performance-observer.ts
+7-11Lines changed: 7 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -95,8 +95,10 @@ export type PerformanceObserverOptions<T> = {
95
95
96
96
/**
97
97
* Whether to enable buffered observation mode.
98
-
* When true, captures all performance entries that occurred before observation started.
99
-
* When false, only captures entries after subscription begins.
98
+
*
99
+
* When true, captures all performance marks and measures that exist in the Node.js
100
+
* performance buffer at the time `subscribe()` is called using `performance.getEntriesByType()`
101
+
* (the native `buffered` option is unreliable in Node.js).
100
102
*
101
103
* @default true
102
104
*/
@@ -309,9 +311,8 @@ export class PerformanceObserverSink<T> {
309
311
*
310
312
* Creates a Node.js PerformanceObserver that monitors 'mark' and 'measure' entries.
311
313
* The observer uses a bounded queue with proactive flushing to manage memory usage.
312
-
* When buffered mode is enabled, any existing buffered entries are immediately flushed.
314
+
* When buffered mode is enabled, existing entries are captured via `performance.getEntriesByType()` instead of the unreliable native `buffered` option.
313
315
* If the sink is closed, items stay in the queue until reopened.
314
-
*
315
316
*/
316
317
subscribe(): void{
317
318
if(this.#observer){
@@ -322,11 +323,7 @@ export class PerformanceObserverSink<T> {
0 commit comments