Tests no longer sit next to the implementation. They import the package through ../src, the root tsconfig still type-checks them, and the package build and declarations cover only src/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Faarh2Ts6StJPcz2mRiHiR
21 lines
816 B
Markdown
21 lines
816 B
Markdown
# Benchmarks
|
|
|
|
Compares core-v2's performance against an earlier implementation (by default
|
|
`main`).
|
|
|
|
From the repository root:
|
|
|
|
```sh
|
|
packages/core-v2/verify/setup-baseline.sh main # extract into verify/.baseline/
|
|
ONLY=baseline npx vitest bench --run --config packages/core-v2/verify/vitest.config.ts
|
|
ONLY=rewrite npx vitest bench --run --config packages/core-v2/verify/vitest.config.ts
|
|
```
|
|
|
|
`scene.bench.ts` measures compositing, push/back cycles, and rendered frames.
|
|
Run each implementation in its own process with `ONLY=`; running both in one
|
|
process biases whichever runs second.
|
|
|
|
Behavioural verification lives with the unit tests: `tests/property.test.ts`
|
|
drives random operation sequences and pointer streams and checks the scene's
|
|
structural invariants after every step. Set `PROPERTY_SEEDS` to run more.
|