MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / queryCheckpoint

Function queryCheckpoint

source code/utils/queryProfiler.ts:71–86  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

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

Tested by

no test coverage detected