* 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,
)
| 578 | * while delivering the event promptly. |
| 579 | */ |
| 580 | async function recordIndexTelemetry( |
| 581 | cg: { getStats(): { filesByLanguage: Record<string, number> }; getBackend(): string }, |
| 582 | result: IndexResult, |
| 583 | ): Promise<void> { |
| 584 | recordIndexEvent(cg, result); |
| 585 | await getTelemetry().flushNow(); |
| 586 | } |
| 587 | |
| 588 | // ============================================================================= |
| 589 | // Commands |
no test coverage detected