chore(bench): add vitest benchmarks for runtime and type-checking performance#3
Draft
Copilot wants to merge 2 commits into
Draft
chore(bench): add vitest benchmarks for runtime and type-checking performance#3Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
Agent-Logs-Url: https://github.com/Teages/gazania/sessions/76607d10-272b-427b-af7a-b8f6777b3d3d Co-authored-by: Teages <39217423+Teages@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
Teages
April 20, 2026 23:46
View session
Deploying gazania with
|
| Latest commit: |
e092444
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c1539c12.gazania.pages.dev |
| Branch Preview URL: | https://copilot-add-benchmark-for-ru.gazania.pages.dev |
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.
Establishes baseline benchmarks for runtime builder performance and TypeScript type-inference cost, enabling data-driven type optimization.
bench/runtime.bench.tsMeasures JS execution speed across the full builder API surface:
gazaniasingleton for each builder typebench/type.bench.tsMeasures
getSemanticDiagnostics()time via the TypeScript compiler API across 8 scenarios of increasing selection complexity:Each iteration creates a fresh
ts.createProgram+ compiler host to avoid cache pollution. Uses{ iterations: 3, warmupIterations: 1 }since each TypeScript compilation costs ~500ms. Each case asserts zero type errors so broken fixtures surface immediately.Compiler setup:
types: ['vitest/importMeta']+typeRootspointing to projectnode_modulessilences theimport.meta.vitestguards present in source files. The virtual file lives atbench/_virtual_type_bench_.tsso relative imports (../src/index,../test/types/schema) resolve against the real project layout without absolute paths.vitest.config.tsAdded
benchmark: { include: ['bench/**/*.bench.ts'] }.Run with: