Skip to content

Add TypeScript 7 external API benchmarks - #158

Merged
Andrew Branch (andrewbranch) merged 5 commits into
mainfrom
api-perf-runner
Oct 19, 2026
Merged

Andrew Branch (andrewbranch) merged 5 commits into
mainfrom
api-perf-runner

Conversation

@andrewbranch

@andrewbranch Andrew Branch (andrewbranch) commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Adds API benchmarking, reading and summing client metrics exported to disk via microsoft/TypeScript#64846

Initial scenarios are

  • typescript-eslint floating-promises over 1024 files
  • typescript-eslint recommended rules over 1024 files
  • vscode-languageserver-protocol's metamodel generator
Copilot description

Summary

Add an opt-in api preset to the existing benchmark pipeline, with whole-command timing and scalar client/server API timing counters. Scenarios use the existing setup.sh, sandbox, argument expansion, and report conventions.

The initial corpus contains native typescript-eslint floating-promises and recommended-rule workloads (1,024 files each), plus vscode-languageserver-node's metamodel generator. Setup pins sources and dependencies; execution injects the matching built JS API/native package and checks the upstream command's output.

Commits

  1. Fix preexisting benchmark filtering and measurement-index serialization bugs, with API-independent regression tests.
  2. Add the API benchmark command, runner, and timing metrics.
  3. Package matching native compiler and JS API artifacts, with direct identity/resolution checks.
  4. Add the corpus, opt-in pipeline preset, and README instructions.

Validation

  • pnpm build; 124 tests across 10 files.
  • ESLint, dprint, shell syntax, and whitespace checks.
  • Built pristine microsoft/TypeScript@39be28b with typescript:build-main and typescript:build-platform, then packaged and ran all three consumers. Both lint workloads checked their expected results; the generated metamodel matched all 545 checked-in definitions. Saved measurements and comparison reports use the normal report path.
  • Ran the exact sandbox setup command bodies in isolated local checkouts, including repeated dependency restoration. Docker/runsc execution itself has not been validated locally.

Both compared compiler commits must include timing-dump support from microsoft/TypeScript#64846. A comparison of its first supporting commit against its parent therefore fails explicitly for missing timing data.

Remap scenario and host indices independently when filtering a report. Serialize scenarioIndex under the correct key while accepting existing scenarioArgs data.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 958b45cd-e40a-46fc-9de9-3bfde150ace3

This comment was marked as resolved.

Run declared Node scripts from prepared solution directories using existing argument expansion and measurement reporting. Require schema-v1 client and server timing dumps and record their scalar counters alongside whole-command wall time.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 958b45cd-e40a-46fc-9de9-3bfde150ace3
Build and retain the TypeScript API and native platform packages for API jobs. Add benchmark-local unstable export aliases and verify package gitHead and executable resolution without a separate artifact manifest.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 958b45cd-e40a-46fc-9de9-3bfde150ace3
Pin native typescript-eslint floating/recommended workloads and the vscode-languageserver metamodel generator. Prepare them with existing sandboxed setup scripts, inject the built API package, and check upstream command output. Wire the api preset to the existing benchmark pipeline with a pinned Node host and document adding scenarios.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 958b45cd-e40a-46fc-9de9-3bfde150ace3
Resolve workspace packages to source in Vitest so tests do not require a preceding build. Invoke the ESLint fixture generator through sh -c, matching the sandbox helper's non-root execution path.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 958b45cd-e40a-46fc-9de9-3bfde150ace3

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Cross-repository artifact packaging and consumer execution need human confirmation through end-to-end Docker/runsc validation, which remains unverified.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

Comment on lines +6 to +10
resolve: {
alias: {
"@ts-perf/core": fileURLToPath(new URL("../core/src/index.ts", import.meta.url)),
},
},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did this end up being needed?

@andrewbranch Andrew Branch (andrewbranch) Oct 19, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an alternative to setting up package.json exports with some kind of source condition, which I opted not to do because no packages currently define exports at all, but I can switch to that if you like

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, it's fine, this is really not the codebase to be picky in

import { configDefaults, defineConfig } from "vitest/config";

export default defineConfig({
resolve: {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

@andrewbranch
Andrew Branch (andrewbranch) merged commit c224b43 into main Oct 19, 2026
28 checks passed
@andrewbranch
Andrew Branch (andrewbranch) deleted the api-perf-runner branch October 19, 2026 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants