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

Function emitPerfettoCounter

src/utils/telemetry/perfettoTracing.ts:863–880  ·  view source on GitHub ↗
(
  name: string,
  values: Record<string, number>,
)

Source from the content-addressed store, hash-verified

861 * Emit a counter event for tracking metrics over time
862 */
863export function emitPerfettoCounter(
864 name: string,
865 values: Record<string, number>,
866): void {
867 if (!isEnabled) return
868
869 const agentInfo = getCurrentAgentInfo()
870
871 events.push({
872 name,
873 cat: 'counter',
874 ph: 'C',
875 ts: getTimestamp(),
876 pid: agentInfo.processId,
877 tid: agentInfo.threadId,
878 args: values,
879 })
880}
881
882/**
883 * Start an interaction span (wraps a full user request cycle)

Callers

nothing calls this directly

Calls 3

getCurrentAgentInfoFunction · 0.85
getTimestampFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected