* Creates a performance mark including payload for a Chrome DevTools 'marker' item. * * Markers appear as vertical lines spanning all tracks and can include custom metadata * for debugging and performance analysis. When profiling is disabled, this method * returns immediately without cre
(name: string, opt?: MarkerOptions)
| 152 | * }); |
| 153 | */ |
| 154 | marker(name: string, opt?: MarkerOptions): void { |
| 155 | if (!this.isEnabled()) { |
| 156 | return; |
| 157 | } |
| 158 | |
| 159 | performance.mark( |
| 160 | name, |
| 161 | asOptions( |
| 162 | markerPayload({ |
| 163 | // marker only takes default color, no TrackMeta |
| 164 | ...(this.#defaults.color ? { color: this.#defaults.color } : {}), |
| 165 | ...opt, |
| 166 | }), |
| 167 | ), |
| 168 | ); |
| 169 | } |
| 170 | |
| 171 | /** |
| 172 | * Measures the execution time of a synchronous operation. |
no test coverage detected