File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ export interface TimeProfilerOptions {
66
66
withContexts ?: boolean ;
67
67
workaroundV8Bug ?: boolean ;
68
68
collectCpuTime ?: boolean ;
69
+ useCPED ?: boolean ;
69
70
}
70
71
71
72
const DEFAULT_OPTIONS : TimeProfilerOptions = {
@@ -75,6 +76,7 @@ const DEFAULT_OPTIONS: TimeProfilerOptions = {
75
76
withContexts : false ,
76
77
workaroundV8Bug : true ,
77
78
collectCpuTime : false ,
79
+ useCPED : false ,
78
80
} ;
79
81
80
82
export async function profile ( options : TimeProfilerOptions = { } ) {
@@ -91,15 +93,15 @@ export function start(options: TimeProfilerOptions = {}) {
91
93
throw new Error ( 'Wall profiler is already started' ) ;
92
94
}
93
95
94
- gProfiler = new TimeProfiler ( { ...options , isMainThread, useCPED : false } ) ;
96
+ gProfiler = new TimeProfiler ( { ...options , isMainThread} ) ;
95
97
gSourceMapper = options . sourceMapper ;
96
98
gIntervalMicros = options . intervalMicros ! ;
97
99
gV8ProfilerStuckEventLoopDetected = 0 ;
98
100
99
101
gProfiler . start ( ) ;
100
102
101
- // If contexts are enabled, set an initial empty context
102
- if ( options . withContexts ) {
103
+ // If contexts are enabled without using CPED , set an initial empty context
104
+ if ( options . withContexts && ! options . useCPED ) {
103
105
setContext ( { } ) ;
104
106
}
105
107
}
You can’t perform that action at this time.
0 commit comments