()
| 1081 | * Reset the tracer state (for testing) |
| 1082 | */ |
| 1083 | export function resetPerfettoTracer(): void { |
| 1084 | if (staleSpanCleanupId) { |
| 1085 | clearInterval(staleSpanCleanupId) |
| 1086 | staleSpanCleanupId = null |
| 1087 | } |
| 1088 | stopWriteInterval() |
| 1089 | metadataEvents.length = 0 |
| 1090 | events.length = 0 |
| 1091 | pendingSpans.clear() |
| 1092 | agentRegistry.clear() |
| 1093 | agentIdToProcessId.clear() |
| 1094 | totalAgentCount = 0 |
| 1095 | processIdCounter = 1 |
| 1096 | spanIdCounter = 0 |
| 1097 | isEnabled = false |
| 1098 | tracePath = null |
| 1099 | startTimeMs = 0 |
| 1100 | traceWritten = false |
| 1101 | } |
| 1102 | |
| 1103 | /** |
| 1104 | * Trigger a periodic write immediately (for testing) |
nothing calls this directly
no test coverage detected