(name: string)
| 63 | * Record a checkpoint with the given name |
| 64 | */ |
| 65 | export function profileCheckpoint(name: string): void { |
| 66 | if (!SHOULD_PROFILE) return |
| 67 | |
| 68 | const perf = getPerformance() |
| 69 | perf.mark(name) |
| 70 | |
| 71 | // Only capture memory when detailed profiling enabled (env var) |
| 72 | if (DETAILED_PROFILING) { |
| 73 | memorySnapshots.push(process.memoryUsage()) |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | /** |
| 78 | * Get a formatted report of all checkpoints |
no test coverage detected