Skip to content

fix(perf-kit): make Worker mode work on more app setups - #11414

Merged
IWANABETHATGUY merged 0 commit into
feat/metrics-lab-field-replayfrom
fix/perf-kit-worker-ab-fixes
Nov 4, 2026
Merged

IWANABETHATGUY merged 0 commit into
feat/metrics-lab-field-replayfrom
fix/perf-kit-worker-ab-fixes

Conversation

@IWANABETHATGUY

@IWANABETHATGUY IWANABETHATGUY commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

perf-kit's Worker mode (worker-scan, worker-attrib) failed or measured nothing on several common Cloudflare Worker setups. This PR fixes each case:

  • Older compatibility_date: the coverage run could not import node:inspector, because that module is off before its default-on date. The coverage run now also sets enable_nodejs_inspector_module.
  • assets.run_worker_first set to a list of routes: newer Miniflare answered perf-kit's own /__lab/* requests from the static assets, so the code to measure never ran. perf-kit now adds /__lab/* to that list.
  • pnpm apps: worker-attrib failed with "No such module", because it skipped dot directories and pnpm puts libraries under node_modules/.pnpm/. It now walks into them; only .vite/ stays out.
  • Fast rebuild (ROLLDOWN_PERF_KIT_WORKER_ONLY=1): the Worker lost its assets config, because the Cloudflare plugin removes it when the client is not built in the same run. The rebuild now puts it back.
  • TanStack Start and React Router apps: worker-attrib could not find the attribution build, because that build is named after the environment (ssr) while the regular output is dist/server. It now picks the one directory that has a wrangler.json.
  • WebSocket routes (agent chats, RPC): there was no way to time code that runs only over a WebSocket. --request 'ws:/path|<message>' opens the socket, sends the message and times it to the last reply.

@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://fix-perf-kit-worker-ab-fixes-rolldown-rs.voidzero-docs.workers.dev (commit 6549437)

This URL reflects your latest Preview deployment

Preview Deployments by commit

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

View logs ↗
https://3621e0c3-rolldown-rs.voidzero-docs.workers.dev 6549437 2026-11-04T09:32:31.296Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://408bdd0f-rolldown-rs.voidzero-docs.workers.dev f59d609 2026-11-04T02:42:53.295Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://0a350fa3-rolldown-rs.voidzero-docs.workers.dev c4a65f4 2026-11-04T02:18:26.081Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://097dd6eb-rolldown-rs.voidzero-docs.workers.dev 964586f 2026-11-03T17:14:45.857Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://864a7092-rolldown-rs.voidzero-docs.workers.dev 06797ba 2026-11-01T04:52:32.871Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://a2ee7bdc-rolldown-rs.voidzero-docs.workers.dev 92a3a4d 2026-11-01T04:44:42.099Z Visit the dashboard ↗

@netlify

netlify Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for rolldown-rs ready!

Name Link
🔨 Latest commit 6549437
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/6aeafb4bc9e9dec028b2eb7b
😎 Deploy Preview https://deploy-preview-11414--rolldown-rs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@IWANABETHATGUY
IWANABETHATGUY force-pushed the fix/perf-kit-worker-ab-fixes branch from 92a3a4d to 06797ba Compare November 1, 2026 04:50
@IWANABETHATGUY IWANABETHATGUY changed the title fix(perf-kit): Worker-mode gaps found in a startup A/B fix(perf-kit): six Worker-mode gaps found in a startup A/B Nov 1, 2026
@IWANABETHATGUY IWANABETHATGUY changed the title fix(perf-kit): six Worker-mode gaps found in a startup A/B fix(perf-kit): make Worker mode work on more app setups Nov 1, 2026
@IWANABETHATGUY
IWANABETHATGUY force-pushed the fix/perf-kit-worker-ab-fixes branch from 06797ba to 964586f Compare November 3, 2026 17:10
@IWANABETHATGUY
IWANABETHATGUY force-pushed the fix/perf-kit-worker-ab-fixes branch 3 times, most recently from f59d609 to 6549437 Compare November 4, 2026 09:30
@IWANABETHATGUY
IWANABETHATGUY marked this pull request as ready for review November 4, 2026 09:32
@IWANABETHATGUY
IWANABETHATGUY merged commit 44e6629 into main Nov 4, 2026
5 checks passed
@IWANABETHATGUY
IWANABETHATGUY deleted the fix/perf-kit-worker-ab-fixes branch November 4, 2026 10:08
shulaoda pushed a commit to raminjafary/rolldown that referenced this pull request Nov 4, 2026
perf-kit's Worker mode (`worker-scan`, `worker-attrib`) failed or
measured nothing on several common Cloudflare Worker setups. This PR
fixes each case:

- **Older `compatibility_date`:** the coverage run could not import
`node:inspector`, because that module is off before its default-on date.
The coverage run now also sets `enable_nodejs_inspector_module`.
- **`assets.run_worker_first` set to a list of routes:** newer Miniflare
answered perf-kit's own `/__lab/*` requests from the static assets, so
the code to measure never ran. perf-kit now adds `/__lab/*` to that
list.
- **pnpm apps:** `worker-attrib` failed with "No such module", because
it skipped dot directories and pnpm puts libraries under
`node_modules/.pnpm/`. It now walks into them; only `.vite/` stays out.
- **Fast rebuild (`ROLLDOWN_PERF_KIT_WORKER_ONLY=1`):** the Worker lost
its `assets` config, because the Cloudflare plugin removes it when the
client is not built in the same run. The rebuild now puts it back.
- **TanStack Start and React Router apps:** `worker-attrib` could not
find the attribution build, because that build is named after the
environment (`ssr`) while the regular output is `dist/server`. It now
picks the one directory that has a `wrangler.json`.
- **WebSocket routes (agent chats, RPC):** there was no way to time code
that runs only over a WebSocket. `--request 'ws:/path|<message>'` opens
the socket, sends the message and times it to the last reply.
shulaoda added a commit that referenced this pull request Nov 5, 2026
## [0.1.0] - 2026-11-05

### 🚀 Features

- perf-kit: add the Worker leads and keep rules from the startup A/B
runs (#11479) by @IWANABETHATGUY
- perf-kit: show module-scope calls and compare with the pinned build in
the same Worker scan (#11415) by @IWANABETHATGUY
- perf-kit: measure the deployed site and replay it for local builds
(#11215) by @IWANABETHATGUY
- perf-kit: diagnose chunk loading before FCP and LCP (#11214) by
@IWANABETHATGUY
- perf-kit: Cloudflare Worker startup mode (#11188) by @IWANABETHATGUY

### 🐛 Bug Fixes

- perf-kit: Worker mode with nested rolldown, external bindings,
redirects (#11498) by @IWANABETHATGUY
- perf-kit: make Worker mode work on more app setups (#11414) by
@IWANABETHATGUY

### 📚 Documentation

- add build report and perf-kit in-depth pages (#11480) by
@IWANABETHATGUY

### ⚙️ Miscellaneous Tasks

- perf-kit: keep run details out of code comments (#11481) by
@IWANABETHATGUY

Co-authored-by: shulaoda <[email protected]>

This branch had an error being deployed

1 failed deployment
void — 44e6629a Deployed Nov 4, 2026 by IWANABETHATGUY via Deploy to Void #7200
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