Repository navigation
bench: add per-tier cold start and rss benchmarks - #116
Draft
natemoo-re wants to merge 2 commits into
Draft
natemoo-re wants to merge 2 commits into
natemoo-re wants to merge 2 commits into
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
commit: |
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.
What does this PR do?
Adds cold-start benchmarks that measure what a CLI pays before its first frame, split by tier, so the cost of stacking a framework on
@clack/uiand@bomb.sh/ttyis measured instead of guessed.packages/ui/bench/startup.bench.tsspawns a fresh Node process per tier. Each fixture inpackages/ui/bench/startup/reports time since process start and peak RSS. The benchmark prints the medians as a table and fails when a tier's peak RSS above bare Node exceeds its budget. Wall time is tracked by CodSpeed like the existing render benchmarks.Local results (macOS, Node 24):
nodetty(createTerm80×24)@clack/ui import@clack/ui first frame(100 rows)preact first frame(same 100 rows)Notes
.mjsthat import the built package. Loading.tsthrough Node's type stripping adds its own memory and startup time. The rootbenchscript now runspnpm buildfirst./parsingand/custom-elementsget tiers when those entry points land.preactas a devDependency and a knip entry for the fixtures, which are spawned by path.