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