Skip to content

chore(benchmarks): codspeed - #1253

Merged
avivkeller merged 2 commits into
mainfrom
codspeed-benchmarks
Dec 5, 2026
Merged

avivkeller merged 2 commits 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 Dec 5, 2026 10:59pm UTC

Request Review

@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

Cloudflare builds and deploys previews for this pull request. Learn more about Cloudflare previews.

Worker Status Deployment Commit
doc-kit Build succeeded No Preview URL was reported.
This is likely because workers.dev previews are disabled and no custom domain is enabled for previews.
5fa1c52

Updated: Dec 5, 2026, 22:59 UTC

@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.78%. Comparing base (ea87b97) to head (5fa1c52).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
bench/generate.bench.mjs 0.00% 66 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1253      +/-   ##
==========================================
- Coverage   93.99%   93.78%   -0.21%     
==========================================
  Files         301      301              
  Lines       31533    31402     -131     
  Branches     3217     3198      -19     
==========================================
- Hits        29638    29449     -189     
- Misses       1873     1931      +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 -98.00 B

File size details
File Main PR Change
benchmark.json 98.00 B — -98.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

@ovflowd

ovflowd commented Nov 23, 2026

Copy link
Copy Markdown
Member

Updates here, @avivkeller?

@avivkeller

Copy link
Copy Markdown
Member Author

Waiting for the TSC

@mcollina mcollina 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.

lgtm

@ovflowd

ovflowd commented Nov 28, 2026

Copy link
Copy Markdown
Member

@avivkeller can you check if the TSC installed the app?

@avivkeller

Copy link
Copy Markdown
Member Author

Not yet

@ovflowd

ovflowd commented Nov 28, 2026

Copy link
Copy Markdown
Member

@mcollina could you act on the issue @avivkeller created on nodejs/admin?

@mcollina

mcollina commented Dec 2, 2026

Copy link
Copy Markdown
Member

Added

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@avivkeller
avivkeller enabled auto-merge (squash) December 5, 2026 22:59
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​codspeed/​tinybench-plugin@​6.1.0951009896100
Addedtinybench@​6.2.310010010095100

View full report

@avivkeller
avivkeller merged commit 69c43c3 into main Dec 5, 2026
28 of 29 checks passed
@avivkeller
avivkeller deleted the codspeed-benchmarks branch December 5, 2026 23:00

This branch was successfully deployed

1 active deployment
Preview – api-docs-tooling — 5fa1c526 Deployed Dec 5, 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.

4 participants