* 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,
)
| 721 | * while delivering the event promptly. |
| 722 | */ |
| 723 | async function recordIndexTelemetry( |
| 724 | cg: { getStats(): { filesByLanguage: Record<string, number> }; getBackend(): string }, |
| 725 | result: IndexResult, |
| 726 | ): Promise<void> { |
| 727 | recordIndexEvent(cg, result); |
| 728 | await getTelemetry().flushNow(); |
| 729 | } |
| 730 | |
| 731 | // ============================================================================= |
| 732 | // Commands |
no test coverage detected