/** * Spawn the index warm-up worker and report what it cost. * * See indexWarmupWorker.ts for the measurements this exists for. The parent * side is deliberately thin: it decides whether to warm at all, and it never * waits — a warm-up that has not finished simply means the first query pays for * the part not yet read, which is the behaviour without it anyway. */ export interface WarmupReport { steps: Array<{ name: string; ms: number; rows: number; }>; failed: Array<{ name: string; error: string; }>; totalMs: number; } export interface WarmupOptions { dbPath: string; labelsDbPath: string; budgetMs?: number; /** Injected in tests; the real one resolves next to the compiled worker. */ workerUrl?: URL; } /** * Is warming worth doing at all? * * `:memory:` has nothing to warm, and INDEX_WARMUP=off is the escape hatch for * an environment where a second reader of the same file is not free (a slow * network share, a container with a hard IOPS cap). */ export declare function shouldWarmIndexes(dbPath: string, labelsDbPath: string): boolean; /** * Run the warm-up in a worker thread. Resolves with what each step cost; * rejects only if the worker itself could not run. */ export declare function warmIndexes(opts: WarmupOptions): Promise; /** One line naming the two most expensive steps — the ones worth acting on. */ export declare function renderWarmupReport(report: WarmupReport): string; //# sourceMappingURL=indexWarmup.d.ts.map