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 @@ -67,6 +67,7 @@ export interface TimeProfilerOptions {
67
67
workaroundV8Bug ?: boolean ;
68
68
collectCpuTime ?: boolean ;
69
69
collectAsyncId ?: boolean ;
70
+ useCPED ?: boolean ;
70
71
}
71
72
72
73
const DEFAULT_OPTIONS : TimeProfilerOptions = {
@@ -77,6 +78,7 @@ const DEFAULT_OPTIONS: TimeProfilerOptions = {
77
78
workaroundV8Bug : true ,
78
79
collectCpuTime : false ,
79
80
collectAsyncId : false ,
81
+ useCPED : false ,
80
82
} ;
81
83
82
84
export async function profile ( options : TimeProfilerOptions = { } ) {
@@ -93,15 +95,15 @@ export function start(options: TimeProfilerOptions = {}) {
93
95
throw new Error ( 'Wall profiler is already started' ) ;
94
96
}
95
97
96
- gProfiler = new TimeProfiler ( { ...options , isMainThread, useCPED : false } ) ;
98
+ gProfiler = new TimeProfiler ( { ...options , isMainThread} ) ;
97
99
gSourceMapper = options . sourceMapper ;
98
100
gIntervalMicros = options . intervalMicros ! ;
99
101
gV8ProfilerStuckEventLoopDetected = 0 ;
100
102
101
103
gProfiler . start ( ) ;
102
104
103
- // If contexts are enabled, set an initial empty context
104
- if ( options . withContexts ) {
105
+ // If contexts are enabled without using CPED , set an initial empty context
106
+ if ( options . withContexts && ! options . useCPED ) {
105
107
setContext ( { } ) ;
106
108
}
107
109
}
You can’t perform that action at this time.
0 commit comments