* 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,
)
| 595 | * while delivering the event promptly. |
| 596 | */ |
| 597 | async 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 |
no test coverage detected