MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / recordIndexTelemetry

Function recordIndexTelemetry

src/bin/codegraph.ts:597–603  ·  view source on GitHub ↗

* Telemetry for a completed full index (see TELEMETRY.md). The bounded flush * keeps init/index responsive (these commands just ran for seconds anyway) * while delivering the event promptly.

(
  cg: { getStats(): { filesByLanguage: Record<string, number> }; getBackend(): string },
  result: IndexResult,
)

Source from the content-addressed store, hash-verified

595 * while delivering the event promptly.
596 */
597async function recordIndexTelemetry(
598 cg: { getStats(): { filesByLanguage: Record<string, number> }; getBackend(): string },
599 result: IndexResult,
600): Promise<void> {
601 recordIndexEvent(cg, result);
602 await getTelemetry().flushNow();
603}
604
605// =============================================================================
606// Commands

Callers 2

runInitFunction · 0.85
mainFunction · 0.85

Calls 3

recordIndexEventFunction · 0.90
getTelemetryFunction · 0.90
flushNowMethod · 0.80

Tested by

no test coverage detected