Does: the figures behind usage.get, computed from the rows of history.db on a read thread.
- Counting, samples, scopes and coverage live in
compute-usage.tsonly (architecture rule 10). The rows are history's. - A
getfor the same floored window joins the read already running. The in-flight key also holdsincludeLedger. - Minute figures read whole minutes only (the minute still running at
tois left out), so a restart does not change them. - Labels are joined on the main thread from a fresh
tokenLabels(); a gateway takes itsrequesterPrefixoff an id first. - A read that throws, a thread that exits, or no answer within
READ_TIMEOUT_MS(index.ts) fails the calls in flight; the next call starts a new thread. stop()terminates the thread; the dispatchers call it fromdispose.- Under tests the thread runs the
.tsfile with a resolve hook that maps.jsimports to.ts.