Add scenario benchmarks and fix ops/sec benchmarks on v1 - #1830
Merged
Merged
Conversation
`npm run benchmark:scenarios` runs pinned real projects in a fresh process each and records cold load/validate time, validate phases, retained heap, peak RSS, edit re-validation (shared vs leaf file, comment vs new function) and a diagnostics hash so behavior changes get caught. Can compare bsc versions, compare results across branches, capture cpu/heap/edit profiles and summarize them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- transpile/transpile-brs used `file.transpile()`, which BrsFile doesn't have in v1 (transpile-brs threw, transpile silently only did xml). Uses `program.getTranspiledFileContents()` when available - `diagnosticFilters: ['**/*']` is a diagnostic code in v1, not a glob, so it filtered nothing. Silence printing instead - replace v8-profiler-next (native, doesn't build on node 22) with the built-in inspector. Profiles go to .tmp/profiles - `--noprepare` never worked, the startup `npm install` pruned the installed versions - `--quick` didn't do anything - remove stale results.json and dead profile code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- clone to a temp dir and move it into place after checkout, so an interrupted checkout doesn't leave a dir at the wrong commit - resolve `--bsc latest` (and ranges) to a real version before picking the install dir Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TwitchBronBron
approved these changes
Sep 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
npm run benchmark:scenarios- runs real projects (pinned to a commit) and records cold load/validate, validate phases, retained heap, peak RSS, and edit re-validation (typing in a shared file vs a leaf file). Also hashes the diagnostics so a perf change that changes behavior gets caught. Can compare bsc versions or results from different branches, and capture/summarize cpu and heap profiles. This is what I used for #1827, #1828 and #1829.Also fixes the existing ops/sec benchmarks, which were mostly broken on v1:
file.transpile(), which BrsFile doesn't have in v1diagnosticFilters: ['**/*']is a code in v1, not a glob, so it filtered nothing--noprepareand--quickdidn't work🤖 Generated with Claude Code