()
| 50 | * Start profiling a new query session |
| 51 | */ |
| 52 | export function startQueryProfile(): void { |
| 53 | if (!ENABLED) return |
| 54 | |
| 55 | const perf = getPerformance() |
| 56 | |
| 57 | // Clear previous marks and memory snapshots |
| 58 | perf.clearMarks() |
| 59 | memorySnapshots.clear() |
| 60 | firstTokenTime = null |
| 61 | |
| 62 | queryCount++ |
| 63 | |
| 64 | // Record the start checkpoint |
| 65 | queryCheckpoint('query_user_input_received') |
| 66 | } |
| 67 | |
| 68 | /** |
| 69 | * Record a checkpoint with the given name |
no test coverage detected