Move scoped introspection benchmark to TypeScript and keep results local - #1851
Conversation
|
Review complete. No issues found — approved ✅. This PR introduces packages/perf-harness, a performance-harness package focused on measuring scoped vs stock introspection cost. The core is src/benchmarks/scoped-introspection/run.ts, which executes both introspection variants against a seeded catalog fixture, captures environment/Postgres metadata before and after runs, computes median timings over warmup+measured repetitions, and writes results. A benchmarks/scoped-introspection.cjs provides the runnable entry, backed by environment and sample CSV fixtures, a written-up benchmark report, and a .gitignore for generated results.
Review of the changed lines surfaced no correctness, security, concurrency, or performance defects that met the confidence threshold after adjudication; the candidate observations were rejected as not actionable within the diff. Reviewed commit: 4fd8f7b |
The scoped introspection benchmark from #1823 kept one run's CSV/environment JSON in source control and used a CommonJS script that required an absolute checkout path. Move the runner to
src/benchmarks/scoped-introspection/run.ts, compiled by the existing CJS/ESM build, and exposepnpm --filter @constructive-io/perf-harness scoped:introspectionwith an optional--outputdirectory. The stock/scoped experiment, validation, SQL diagnostics, and database cleanup are preserved.Remove the recorded CSV and environment JSON, ignore the default generated-results directory, and retain the dated methodology, historical performance summary, environment details, and links to the original artifacts at their fixed commit. The new validation results remain local; the historical performance figures are unchanged.
Validation:
git diff --checkpassed.