MCPcopy Create free account
hub / github.com/code-pushup/cli / marker

Method marker

packages/utils/src/lib/profiler/profiler.ts:154–169  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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.

Callers 5

#transitionMarkerMethod · 0.80
#handleFatalErrorMethod · 0.80

Calls 3

isEnabledMethod · 0.95
asOptionsFunction · 0.85
markerPayloadFunction · 0.85

Tested by

no test coverage detected