MCPcopy Index your code
hub / github.com/codeaashu/claude-code / resetPerfettoTracer

Function resetPerfettoTracer

src/utils/telemetry/perfettoTracing.ts:1083–1101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1081 * Reset the tracer state (for testing)
1082 */
1083export 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)

Callers

nothing calls this directly

Calls 2

stopWriteIntervalFunction · 0.85
clearMethod · 0.45

Tested by

no test coverage detected