MCPcopy
hub / github.com/codeaashu/claude-code / queryCheckpoint

Function queryCheckpoint

src/utils/queryProfiler.ts:69–84  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

67 * Record a checkpoint with the given name
68 */
69export function queryCheckpoint(name: string): void {
70 if (!ENABLED) return
71
72 const perf = getPerformance()
73 perf.mark(name)
74 memorySnapshots.set(name, process.memoryUsage())
75
76 // Track first token specially
77 if (name === 'query_first_chunk_received' && firstTokenTime === null) {
78 const marks = perf.getEntriesByType('mark')
79 if (marks.length > 0) {
80 const lastMark = marks[marks.length - 1]
81 firstTokenTime = lastMark?.startTime ?? 0
82 }
83 }
84}
85
86/**
87 * End the current query profiling session

Callers 8

queryLoopFunction · 0.85
executeUserInputFunction · 0.85
startQueryProfileFunction · 0.85
endQueryProfileFunction · 0.85
processUserInputFunction · 0.85
processUserInputBaseFunction · 0.85
REPLFunction · 0.85
queryModelFunction · 0.85

Calls 2

getPerformanceFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected