* 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,
)
| 450 | * while delivering the event promptly. |
| 451 | */ |
| 452 | async function recordIndexTelemetry( |
| 453 | cg: { getStats(): { filesByLanguage: Record<string, number> }; getBackend(): string }, |
| 454 | result: IndexResult, |
| 455 | ): Promise<void> { |
| 456 | recordIndexEvent(cg, result); |
| 457 | await getTelemetry().flushNow(); |
| 458 | } |
| 459 | |
| 460 | // ============================================================================= |
| 461 | // Commands |
no test coverage detected