import { QueryProfiler, QuerySpan } from "./storage.mjs"; /** * Build a {@link QueryProfiler} that records each closed span to `sink`. * * `start(name, meta)` stamps the open time and returns an `end` thunk; calling * `end(extra)` records `{ name, ms, meta }` with `extra` merged over the * open-time `meta` (so completion-only facts — row counts, buffered-file * counts — land on the same span). `now` is injectable for deterministic * tests; it defaults to `Date.now`. */ declare function createQueryProfiler(sink: (span: QuerySpan) => void, now?: () => number): QueryProfiler; /** * A profiler that accumulates closed spans into an array — for tests, the CLI * `query` command, or any ad-hoc "where did the time go" probe. The returned * `spans` array is filled as spans close, in completion order. */ declare function collectSpans(now?: () => number): { profiler: QueryProfiler; spans: QuerySpan[]; }; export { collectSpans, createQueryProfiler };