Skip to content

ci(bench): add manual walltime runs on a CodSpeed macro runner - #130

Merged
lcottercertinia merged 2 commits into
mainfrom
ci/codspeed-instruments
Oct 10, 2026
Merged

lcottercertinia merged 2 commits into
mainfrom
ci/codspeed-instruments

Conversation

@lukecotter

@lukecotter lukecotter commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

📝 Overview

CodSpeed runs in simulation mode only. It counts instructions with V8's --no-opt, so CI never measures TurboFan-optimised code, and its figures do not match local wall time.

This adds a walltime job on a CodSpeed macro runner: real time, with the full JIT. It runs only on manual dispatch. Pull requests keep simulation mode as the gate.

🛠️ Changes

  • walltime job on workflow_dispatch only — macro runner minutes are billed (600 a month on the free plan), and a pull request would run fork code on the runner.
  • Runner codspeed-macro-x64-ryzen-9950x-ubuntu-24-04 — wall time on a shared runner is too noisy.
  • Docs state what simulation does not measure, and why walltime is manual.

Before the first walltime run, an org admin must allow public repositories in the macro runner group. Without that, the job queues until it times out.

Memory mode was tried here and removed. It tracks malloc, not the V8 heap, so it shows none of today's parser's objects. It moves to #125, where the v1 parser keeps its store in typed arrays that memory mode does track.

🧩 Type of change

  • 🐛 Bug fix — fixes an issue
  • ✨ Feature — adds new functionality
  • ♻️ Refactor — no behaviour change
  • ⚡ Performance
  • 📝 Docs
  • 🔧 Chore — tooling, CI, deps
  • 💥 Breaking change

🔗 Related issues

N/A

✅ Checklist

  • Tests added/updated
  • pnpm run ci passes locally
  • Changeset added (pnpm changeset) if this affects the published package
  • Docs updated if behaviour or the public API changed

Run the benchmarks in memory mode next to simulation mode on each
pull request. Add a walltime job on a CodSpeed macro runner that runs
only on manual dispatch, because macro runner minutes are billed.
@codspeed

codspeed Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 3 untouched benchmarks


Comparing ci/codspeed-instruments (bbf4155) with main (04159cc)

Open in CodSpeed

Memory mode tracks malloc, not the V8 heap, so it shows none of
today's parser's objects. The v1 parser keeps its store in typed
arrays, which it does track, so the mode moves to that pull request.
@lukecotter lukecotter changed the title ci(bench): track memory in CodSpeed, add manual walltime runs ci(bench): add manual walltime runs on a CodSpeed macro runner Oct 10, 2026
@lcottercertinia
lcottercertinia merged commit 8bb1363 into main Oct 10, 2026
9 checks passed
@lcottercertinia
lcottercertinia deleted the ci/codspeed-instruments branch October 10, 2026 13:10
lukecotter added a commit that referenced this pull request Oct 10, 2026
Resolve the bench files for v1: parse.bench.ts builds with the engine
under the parse_<size> names, and large.ts keeps the heap gate. Rename
the logs in legacy-v0.3.json so --baseline matches them. Turn CodSpeed
memory mode back on: v1's store is in typed arrays, which it tracks.
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.

2 participants