(phase: string, durationMs: number)
| 283 | let nextFrameSeq = 1; |
| 284 | |
| 285 | function perfRecord(phase: string, durationMs: number): void { |
| 286 | if (!PERF_ENABLED) return; |
| 287 | if (perfSamples.length >= PERF_MAX_SAMPLES) { |
| 288 | perfSamples.shift(); |
| 289 | } |
| 290 | perfSamples.push({ phase, durationMs }); |
| 291 | } |
| 292 | |
| 293 | function perfSnapshot(): NodeBackendPerfSnapshot { |
| 294 | const byPhase = new Map<string, number[]>(); |