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