MCPcopy Index your code
hub / github.com/angular/angular / setProfiler

Function setProfiler

packages/core/src/render3/profiler.ts:34–44  ·  view source on GitHub ↗
(profiler: Profiler | null)

Source from the content-addressed store, hash-verified

32 * @returns a cleanup function that, when invoked, removes a given profiler callback.
33 */
34export function setProfiler(profiler: Profiler | null): () => void {
35 if (profiler !== null) {
36 if (!profilerCallbacks.includes(profiler)) {
37 profilerCallbacks.push(profiler);
38 }
39 return () => removeProfiler(profiler);
40 } else {
41 profilerCallbacks.length = 0;
42 return NOOP_PROFILER_REMOVAL;
43 }
44}
45
46/**
47 * Profiler function which wraps user code executed by the runtime.

Callers 2

profiler_spec.tsFile · 0.90
enableProfilingFunction · 0.90

Calls 2

removeProfilerFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…