Skip to content

chore(benchmarks): codspeed - #1253

Open
avivkeller wants to merge 1 commit into
mainfrom
codspeed-benchmarks
Open

avivkeller wants to merge 1 commit into
mainfrom
codspeed-benchmarks

Conversation

@avivkeller

Copy link
Copy Markdown
Member

So that we can have acurate benchmark reporting, and not the suboptimal, noisy implementation we have now

@avivkeller
avivkeller requested a review from a team as a code owner November 9, 2026 05:35
@vercel

vercel Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
api-docs-tooling Ready Ready Preview Nov 9, 2026 5:37am UTC

Request Review

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ c8e6930 2026-11-09T05:37:31.471Z View logs ↗
  • Build: In progress 🔵

View logs ↗
7782f54 2026-11-09T05:36:38.175Z View logs ↗

@codecov

codecov Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 7.04225% with 66 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.95%. Comparing base (07858b1) to head (c8e6930).

Files with missing lines Patch % Lines
bench/generate.bench.mjs 0.00% 66 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1253      +/-   ##
==========================================
- Coverage   94.18%   93.95%   -0.23%     
==========================================
  Files         291      291              
  Lines       29214    29083     -131     
  Branches     2969     2950      -19     
==========================================
- Hits        27515    27326     -189     
- Misses       1677     1735      +58     
  Partials       22       22              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

api-links Generator

Output: 1 file differs

  • benchmark.json removed

json Generator

Output: 1 file differs

  • benchmark.json removed

legacy-html Generator

Output size: 1 file changed · net -99.00 B

File size details
File Main PR Change
benchmark.json 99.00 B — -99.00 B (-100.0%)

legacy-json Generator

Output: 1 file differs

  • benchmark.json removed

llms-txt Generator

Output size: 1 file changed · net -97.00 B

File size details
File Main PR Change
benchmark.json 97.00 B — -97.00 B (-100.0%)

orama-db Generator

Output size: 1 file changed · net -97.00 B

File size details
File Main PR Change
benchmark.json 97.00 B — -97.00 B (-100.0%)

web Generator

Output size: 1 file changed · net -99.00 B

File size details
File Main PR Change
benchmark.json 99.00 B — -99.00 B (-100.0%)

ovflowd
ovflowd previously approved these changes Nov 9, 2026

@ovflowd ovflowd left a comment

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.

SGTM!

@ovflowd
ovflowd dismissed their stale review November 9, 2026 14:38

I actually noticed a few gaps that I want to have addressed.

@ovflowd ovflowd left a comment •

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.

Main concern is that we only measure single threaded here, which misses most of what my open perf PRs change. Rest inline :)

Comment thread .github/workflows/codspeed.yml Resolved
Comment thread .github/workflows/generate.yml Resolved
Comment thread bench/generate.bench.mjs Resolved
Comment thread CONTRIBUTING.md
## Benchmarks

Generation speed and memory are measured with [CodSpeed](https://codspeed.io)
(`bench/generate.bench.mjs`), on one thread. The workflow checks `nodejs/node`

@ovflowd ovflowd Nov 9, 2026 •

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.

nit: say this is single threaded, so a flat result doesn't read as no change

Comment thread bench/generate.bench.mjs Resolved
Comment thread bench/generate.bench.mjs Resolved
- name: Run benchmarks
uses: CodSpeedHQ/action@af75f77f17a054769abefaa42fe8dc2975469b5f # v5.6.3
with:
mode: simulation,memory

@ovflowd ovflowd Nov 9, 2026 •

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.

Memory here is allocations on a warm build, not the peak RSS anyone actually hits. Not sure what we want those numbers to tell us

Comment thread .github/workflows/codspeed.yml Resolved
@avivkeller
avivkeller requested a review from ovflowd November 9, 2026 15:06
@ovflowd

ovflowd commented Nov 9, 2026

Copy link
Copy Markdown
Member

I also want to ensure that our benchmarking accomplishes one thing: be able to assess the impact of a PR across all possible (reasonably and measurably that make sense) points. Single threaded comparison shouldn't be the ultimate goal. Realistically no one is going to run it single threaded and bringing multi-threaded performance should matter.

@avivkeller

Copy link
Copy Markdown
Member Author

In a follow-up, we can set up a label based multi-threaded-benchmark which runs a more powerful benchmark on multiple threads, but that shouldn't be run by default, since CodSpeed only allocates a limited number of walltime minutes. For an initial benchmark system, this is enough, IMO.

@ovflowd

ovflowd commented Nov 9, 2026

Copy link
Copy Markdown
Member

In a follow-up, we can set up a label based multi-threaded-benchmark which runs a more powerful benchmark on multiple threads, but that shouldn't be run by default, since CodSpeed only allocates a limited number of walltime minutes. For an initial benchmark system, this is enough, IMO.

Right... Look, I feel that these Benchmark runs should anyways be on-demand. Not done by default. Plus it should include multi-threaded regardless. This information is pretty important IMO. And I believe we could be using Runners that support this or even shared infra we have... (ie.: self hosted runners) or something like https://www.blacksmith.sh/ IDK

But TL;DR I think our Benchmark should have this from the go. I don't think it should be a follow-up (I'm not super -1 on the current PR and if you really want to push as is, I'd be fine, but I genuinely believe this should be integrated here)

@avivkeller

Copy link
Copy Markdown
Member Author

Requesting the walltime minutes will take time, I feel that we should start with this and work our way up

@ovflowd

ovflowd commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Requesting the walltime minutes will take time, I feel that we should start with this and work our way up

I disagree. There's no rush here (to get this merged) and there are no other incoming performance PRs at the time except mine... (I don't consider incremental builds as a performance PR because it is a mechanism to skip building pieces... so it isn't an end-to-end verification)

@avivkeller

Copy link
Copy Markdown
Member Author

@nodejs/TSC I've requested the CodSpeed app to be installed on this repository

This branch was successfully deployed

1 active deployment
Preview – api-docs-tooling — c8e69309 Deployed Nov 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants