You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: stand elapsed-time bounds down under coverage
- add packages/mejiro/tests/timing.ts exporting expectElapsedUnder(), which
skips the wall-clock bound while coverage is being collected; the
surrounding test still runs and still asserts what the operation
produced, so the correctness checks and their coverage are unaffected
- V8 instrumentation multiplies elapsed time by a factor that varies with
the input, so a budget or a scaling ratio measured under it describes
the instrumentation rather than the code: tokenizeManuscriptSource is
cleanly linear uninstrumented (11.9ms -> 22.8ms -> 48.7ms -> 94.4ms as
the input doubles from 160k to 1.28M characters) yet reads as nearly
quadratic with coverage on
- expose whether the run collects coverage to the tests through a
MEJIRO_COVERAGE env var in vitest.config.ts
- route the eight elapsed-time assertions in chapter-layout-cost,
manuscript-tokens and epub/xml-utils through the helper, the xml-utils
pair included since it is the same construction
- leave the regression coverage on those runs to the deterministic guards
that do not depend on machine speed: the characters fed to
computeBreaks and the buildRenderPage call count
- raise testTimeout to 30s, since several tests parse every source file in
the workspace or build EPUB archives from scratch and exceed the 5s
default under instrumentation
0 commit comments