Starts UI profiling (only effective in 'manual' mode and when sampled).
()
| 94 | |
| 95 | /** Starts UI profiling (only effective in 'manual' mode and when sampled). */ |
| 96 | public start(): void { |
| 97 | if (this._lifecycleMode === 'trace') { |
| 98 | DEBUG_BUILD && |
| 99 | debug.warn( |
| 100 | '[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.start()` are ignored in trace mode.', |
| 101 | ); |
| 102 | return; |
| 103 | } |
| 104 | |
| 105 | if (this._isRunning) { |
| 106 | DEBUG_BUILD && debug.warn('[Profiling] Profile session is already running, `uiProfiler.start()` is a no-op.'); |
| 107 | return; |
| 108 | } |
| 109 | |
| 110 | if (!this._sessionSampled) { |
| 111 | DEBUG_BUILD && debug.warn('[Profiling] Session is not sampled, `uiProfiler.start()` is a no-op.'); |
| 112 | return; |
| 113 | } |
| 114 | |
| 115 | this._beginProfiling(); |
| 116 | } |
| 117 | |
| 118 | /** Stops UI profiling (only effective in 'manual' mode). */ |
| 119 | public stop(): void { |
no test coverage detected