MCPcopy Create free account
hub / github.com/codeaashu/claude-code / emitPerfettoInstant

Function emitPerfettoInstant

src/utils/telemetry/perfettoTracing.ts:840–858  ·  view source on GitHub ↗
(
  name: string,
  category: string,
  args?: Record<string, unknown>,
)

Source from the content-addressed store, hash-verified

838 * Emit an instant event (marker)
839 */
840export function emitPerfettoInstant(
841 name: string,
842 category: string,
843 args?: Record<string, unknown>,
844): void {
845 if (!isEnabled) return
846
847 const agentInfo = getCurrentAgentInfo()
848
849 events.push({
850 name,
851 cat: category,
852 ph: 'i',
853 ts: getTimestamp(),
854 pid: agentInfo.processId,
855 tid: agentInfo.threadId,
856 args,
857 })
858}
859
860/**
861 * Emit a counter event for tracking metrics over time

Callers

nothing calls this directly

Calls 3

getCurrentAgentInfoFunction · 0.85
getTimestampFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected