| 124 | * the same `NgCompiler` for a new compilation. |
| 125 | */ |
| 126 | export 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…