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

Class DelegatingPerfRecorder

packages/compiler-cli/src/ngtsc/perf/src/recorder.ts:126–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124 * the same `NgCompiler` for a new compilation.
125 */
126export class DelegatingPerfRecorder implements PerfRecorder {
127 constructor(public target: PerfRecorder) {}
128
129 eventCount(counter: PerfEvent, incrementBy?: number): void {
130 this.target.eventCount(counter, incrementBy);
131 }
132
133 phase(phase: PerfPhase): PerfPhase {
134 return this.target.phase(phase);
135 }
136
137 inPhase<T>(phase: PerfPhase, fn: () => T): T {
138 // Note: this doesn't delegate to `this.target.inPhase` but instead is implemented manually here
139 // to avoid adding an additional frame of noise to the stack when debugging.
140 const previousPhase = this.target.phase(phase);
141 try {
142 return fn();
143 } finally {
144 this.target.phase(previousPhase);
145 }
146 }
147
148 memory(after: PerfCheckpoint): void {
149 this.target.memory(after);
150 }
151
152 reset(): void {
153 this.target.reset();
154 }
155}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…