perf(test): trim runtime lookups and add changed bench

This commit is contained in:
Peter Steinberger
2026-04-06 16:48:32 +01:00
parent 8477f1841a
commit 8a33a8d607
11 changed files with 430 additions and 63 deletions

View File

@@ -88,6 +88,8 @@ Think of the suites as “increasing realism” (and increasing flakiness/cost):
- Perf-debug note:
- `pnpm test:perf:imports` enables Vitest import-duration reporting plus import-breakdown output.
- `pnpm test:perf:imports:changed` scopes the same profiling view to files changed since `origin/main`.
- `pnpm test:perf:changed:bench -- --ref <git-ref>` compares routed `test:changed` against the native root-project path for that committed diff and prints wall time plus macOS max RSS.
- `pnpm test:perf:changed:bench -- --worktree` benchmarks the current dirty tree by routing the changed file list through `scripts/test-projects.mjs` and the root Vitest config.
- `pnpm test:perf:profile:main` writes a main-thread CPU profile for Vitest/Vite startup and transform overhead.
- `pnpm test:perf:profile:runner` writes runner CPU+heap profiles for the unit suite with file parallelism disabled.