ts-memory-baseline
/ts-memory-baseline
Measure and compare TypeScript memory usage for @regle/core and test typechecks. Use when checking TS server pressure, type-level perf regressions, or before/after heavy generic typing changes.
- Author
- victorgarciaesgi ↗
- Repository
- regle ↗
- Licence
- MIT
- Last repository change
- 13.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 13.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Measure and compare TypeScript memory usage for @regle/core and test typechecks. Use when checking TS server pressure, type-level perf regressions, or before/after heavy generic typing changes.
Original author description
Measure and compare TypeScript memory usage for @regle/core and test typechecks. Use when checking TS server pressure, type-level perf regressions, or before/after heavy generic typing changes.
How it works
- Hard requirements
- Environment setup
- Measurement runbook (must follow)
- Measurement commands
- Comparison protocol
- Results storage
SKILL.md preview
--- name: ts-memory-baseline description: Measure and compare TypeScript memory usage for @regle/core and test typechecks. Use when checking TS server pressure, type-level perf regressions, or before/after heavy generic typing changes. metadata: author: regle version: "2026.03.19" --- # TypeScript memory baseline procedure This skill defines a reproducible process to measure TypeScript memory usage in this repository. ## Hard requirements 1. Use Node 24 for all measurements. 2. Run `pnpm build` before any test-related measurement. 3. `pnpm run test:typecheck` should never fail. If it fails, treat the run as invalid for regression tracking. ## Environment setup ```bash PATH="/Users/victorgarcia/.nvm/versions/node/v24.15.0/bin:$PATH" node -v pnpm -v ``` Expected: - Node `v24.x` - pnpm `11.20.0` (or project-compatible version) ## Measurement runbook (must follow) 1. Ensure no extra monorepo tasks are running. 2. Use the exact Node 24 PATH prefix in every command. 3. Run one warm-up pass that is discarded. 4. Run 3 measured passes and compare medians. 5. Save only the final medians in `tests/TS_MEMORY_BASELINE_RESULTS.md`. ## Measurement commands ### A. @regle/core compiler diagnostics ```bash PATH="/Users/victorgarcia/.nvm/versions/node/v24.15.0/bin:$PATH" \ ./node_modules/.bin/tsc -p "packages/core/tsconfig.json" --noEmit --extendedDiagnostics ``` Capture: - `Memory used` - `Instantiations` - `Check time` ### B. Full type tests memory Run build first: ```bash PATH="/Users/victorgarcia/.nvm/versions/node/v24.15.0/bin:$PATH" pnpm build ``` Then: ```bash PATH="/Users/victorgarcia/.nvm/versions/node/v24.15.0/bin:$PATH" \ /usr/bin/time -l pnpm run test:typecheck ``` Capture: - exit code (must be `0`) - `maximum resident set size` - `peak memory footprint` - `real/user/sys` Recommended sequence: ```bash # warm-up (discard) PATH="/Users/victorgarcia/.nvm/versions/node/v24.15.0/bin:$PATH" \ /usr/bin/time -l corepack pnpm run test:typecheck # measured runs (collect all 3) PATH="/Users/victorgarcia/.nvm/versions/node/v24.15.0/bin:$PATH" \ /usr/bin/time -l corepack pnpm run test:typecheck PATH="/Users/victorgarcia/.nvm/versions/node/v24.15.0/bin:$PATH" \ /usr/bin/time -l corepack pnpm run test:typecheck PATH="/Users/victorgarcia/.nvm/versions/node/v24.15.0/bin:$PATH" \ /usr/bin/time -l corepack pnpm run test:typecheck ``` ## Comparison protocol Use median deltas because absolute values can vary with machine/CPU load. 1. Compute medians for old baseline and new run. 2. Compute delta % = `(new - old) / old * 100`. 3. Evaluate with these thresholds: - **Likely noise**: within `±5%` for memory metrics. - **Watch zone**: `>5%` and `<=10%` increase. - **Regression candidate**: `>10%` increase. 4. For `Check time` and `real time`, treat as noisy: - investigate only if increase is `>15%` and reproducible across runs. 5. If `pnpm run test:typecheck` exit code is non-zero, invalidate the run (do not update baseline). ## Results storage Store only numeric outcomes in: - `tests/TS_MEMORY_BASELINE_RESULTS.md` Do not put procedural instructions in the results file.
Versions
The database has no other skills named ts-memory-baseline.
Database snapshot: 13.11.2026 · package version 635b12c32601 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90regle-typescript
TypeScript integration for Regle — type-safe validated output (`InferSafeOutput`, `$validate`), inferring state from rules (`InferInput`), typing computed rules (`inferRules`, `RegleComputedRules`), and typing component props (`InferRegleRoot`, `RegleRoot`, `RegleFieldStatus`,… - 100regle-rules
Regle validation rules — built-in rules from `@regle/rules`, custom rules with `createRule`, rule wrappers (`withMessage`, `withParams`, `withAsync`, `withTooltip`), and rule operators (`and`, `or`, `xor`, `not`, `applyIf`, `assignIf`, `pipe`). Use when declaring, customizing,… - 100advanced-types
Type-level TypeScript. Use when a type resolves to any/never/unknown or refuses to narrow, when writing reusable type utilities or type tests, or when type-checking is slow or hits a depth error (ts2589). - 100typescript-pro
Use when implementing TypeScript code requiring advanced type system patterns, complex generics, type-level programming, or end-to-end type safety across full-stack applications. - 100typescript-expert
TypeScript and JavaScript expert for type-level programming, performance optimization, and modern tooling. Use when solving complex type issues, build problems, or migration decisions. - 100typescript-rules
Applies type safety and error handling rules. Enforces no-any policy and type guards. Use when implementing TypeScript or reviewing types.