Skip to content

feat(devtools): report mode - agent-readable build metrics report - #10364

Merged
IWANABETHATGUY merged 7 commits into
mainfrom
feat/devtools-build-metrics
Oct 29, 2026
Merged

IWANABETHATGUY merged 7 commits into
mainfrom
feat/devtools-build-metrics

Conversation

@IWANABETHATGUY

@IWANABETHATGUY IWANABETHATGUY commented Jul 20, 2026 •

Copy link
Copy Markdown
Member

devtools: { mode: 'report' } folds the devtools event stream in-memory into one build report per output, under node_modules/.rolldown/report/<output dir>, instead of writing the JSON-lines event log, so that a coding agent can read sizes, per-hook timings and the module graph without parsing the event stream. mode: 'full' is unchanged.

Draft until I have build-overhead numbers for mode: 'report' vs devtools off, and docs.

@netlify

netlify Bot commented Jul 20, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit 0cc6cdc
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/6ae2a959eeb129fc2ee17afc

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

metrics or markdown? Matching for format instead of usecase.

Also, does it make sense to output both formats?

@IWANABETHATGUY

Copy link
Copy Markdown
Member Author

metrics or markdown? Matching for format instead of usecase.

Also, does it make sense to output both formats?

The original devtools generated large raw JSON. However, always producing raw JSON did not make sense because you never want the agent to read the full raw JSON—that would increase token usage significantly. The current strategy is that when metric mode is used, a markdown summary plus trimmed JSON is generated, optimized for the agent.

Regarding the first question, I agree with you that we should use a better name than metric.

@pkg-pr-new

pkg-pr-new Bot commented Jul 22, 2026

Copy link
Copy Markdown

Open in StackBlitz

@rolldown/browser

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/browser@10364 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/browser@10364 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/debug

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/debug@10364 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/debug@10364 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

rolldown

pnpm add https://pkg.pr.new/rolldown/rolldown@10364 -D
npm i https://pkg.pr.new/rolldown/rolldown@10364 -D
yarn add https://pkg.pr.new/rolldown/[email protected] -D

@rolldown/binding-android-arm64

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-android-arm64@10364 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-android-arm64@10364 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-darwin-arm64

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-darwin-arm64@10364 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-darwin-arm64@10364 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-darwin-x64

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-darwin-x64@10364 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-darwin-x64@10364 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-freebsd-x64

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-freebsd-x64@10364 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-freebsd-x64@10364 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-linux-arm-gnueabihf

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-arm-gnueabihf@10364 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-arm-gnueabihf@10364 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-linux-arm64-gnu

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-arm64-gnu@10364 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-arm64-gnu@10364 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-linux-arm64-musl

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-arm64-musl@10364 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-arm64-musl@10364 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-linux-ppc64-gnu

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-ppc64-gnu@10364 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-ppc64-gnu@10364 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-linux-s390x-gnu

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-s390x-gnu@10364 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-s390x-gnu@10364 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-linux-x64-gnu

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-x64-gnu@10364 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-x64-gnu@10364 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-linux-x64-musl

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-x64-musl@10364 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-x64-musl@10364 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-openharmony-arm64

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-openharmony-arm64@10364 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-openharmony-arm64@10364 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-wasm32-wasi

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-wasm32-wasi@10364 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-wasm32-wasi@10364 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-win32-arm64-msvc

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-win32-arm64-msvc@10364 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-win32-arm64-msvc@10364 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-win32-x64-msvc

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-win32-x64-msvc@10364 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-win32-x64-msvc@10364 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

commit: e34543e

@webfansplz

Copy link
Copy Markdown
Contributor

Thanks for the PR! We're building MCP tooling for vite-devtools on top of rolldown's build data, and there are a couple of things we'd like to discuss for that use case:

1. Could full mode also emit the metrics report?

The devtools MCP is read-only by design — it never triggers builds, it just reads whatever the user's build produced. With full and metrics being mutually exclusive, users end up choosing between having the DevTools UI and having the MCP work, but those two consumers are usually the same person, same project, same build.

Since the metrics aggregation happens in memory over the same event stream, the marginal cost of emitting metrics on top of full mode should mostly be writing a few small files at the end. So instead of exclusive modes, could the two be composable — e.g. full mode also emits metrics, by default or opt-in? One build would then serve both the UI (event logs) and agents (metrics). Metrics-only still makes total sense for agent loops where you want to skip the full-log overhead — we really like that part.

One small related ask: a reliable way to correlate the metrics output with the corresponding session. When both are present, the flow we have in mind is "use metrics to locate the problem fast, then drill into that session's event logs for details" — which needs a link between the two. That could be nesting the metrics output under the session folder, or including the session id in metrics.json and history.jsonl — whichever fits the design better (though history.jsonl probably wants it either way, since buildIndex resets per session and lines from different sessions would collide).

2. A few extra fields

We checked the metrics output against what our existing analysis tools need. The following seem to already exist in the internal aggregation structs — they're just not exported:

module-graph.json (it's already the "filter it, never load it whole" file, so per-node fields shouldn't conflict with the condensed-report design):

  • package on each module node (the package it belongs to, name@version). The event stream already has this via MPackage.modules. We need it to answer "why is package X in my bundle" (package-target dependency trace) — without it we're stuck inferring from node_modules paths, which falls apart with pnpm and monorepos.
  • chunk on each module node (the chunk file it ended up in). We need it for chunk/asset-target traces, "which chunks contain this module", and initial/async classification. One field covers all of these, and avoids exporting a full chunk→modules list in metrics.json (which admittedly wouldn't fit the condensed design).
  • Keep the import kind (or at least a static/dynamic flag) on imports edges — if they're currently serialized down to bare module ids. We need it to mark dynamic boundaries along trace paths.

metrics.json:

  • entryModule on chunks.largest[] (ChunkAgg already has it). Lets us go from a chunk or asset back to its entry module.
  • Truncation markers on the top-N lists (truncated: true or a totalCount). An agent needs to know whether something is missing or just not listed, so it can decide when to drill into module-graph.json or the full logs. Related question: is the assets array complete, or capped at top-N as well?
  • The full plugin list in session ([{ index, name }]). Right now there's only pluginCount, so plugins that never had a hook called are invisible, and we can't reliably answer "which plugins were in this build".

There are two more module-level things we'd use — the per-module transform size chain (before/after, for attributing transform bloat and estimating tree-shaking) and per-module resolve/load timings (for pinpointing modules under load/resolve-heavy plugins) — but we get that those might be out of scope for a condensed report. Happy to open a separate issue for them; on the MCP side we can fall back to the full logs for now.

@IWANABETHATGUY
IWANABETHATGUY force-pushed the feat/devtools-build-metrics branch 3 times, most recently from bd4fba0 to 32628db Compare August 3, 2026 09:24
@IWANABETHATGUY
IWANABETHATGUY force-pushed the feat/devtools-build-metrics branch from 32628db to 53690c2 Compare September 23, 2026 08:41
@IWANABETHATGUY
IWANABETHATGUY force-pushed the feat/devtools-build-metrics branch from 53690c2 to 5e89ce2 Compare October 15, 2026 01:43
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://feat-devtools-build-metrics-rolldown-rs.voidzero-docs.workers.dev (commit 0cc6cdc)

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://2c0ef472-rolldown-rs.voidzero-docs.workers.dev 0cc6cdc 2026-10-29T02:04:59.783Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://e4745ce1-rolldown-rs.voidzero-docs.workers.dev df050b4 2026-10-28T18:15:49.314Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://5867adb1-rolldown-rs.voidzero-docs.workers.dev 67c06d2 2026-10-28T15:57:48.308Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://a9ea31fe-rolldown-rs.voidzero-docs.workers.dev 713ec12 2026-10-28T13:21:27.711Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://e0b1cc25-rolldown-rs.voidzero-docs.workers.dev b3040ff 2026-10-28T03:55:37.499Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://b1890c9c-rolldown-rs.voidzero-docs.workers.dev 5e89ce2 2026-10-15T01:45:55.794Z Visit the dashboard ↗

@IWANABETHATGUY
IWANABETHATGUY force-pushed the feat/devtools-build-metrics branch 2 times, most recently from b3040ff to 713ec12 Compare October 28, 2026 13:17
@IWANABETHATGUY IWANABETHATGUY changed the title feat(devtools): metrics mode - agent-readable build metrics report feat(devtools): report mode - agent-readable build metrics report Oct 28, 2026
`devtools: { mode: "metrics" }` folds the devtools event stream in-memory
into a small report written beside the build instead of the event-log sink:
metrics.json (schema v1, flat unit-suffixed metric ids) + markdown views
(entry/timing/chunks/modules/packages/graph/delta) + module-graph.json
(static graph with dominator retained sizes) + history.jsonl (one line per
build, watch rebuilds included) + an in-dir AGENTS.md consumption contract.

- comparison is precomputed: delta vs the previous build and baselineDelta
  vs a pinned reference (copy metrics/.state.json to baseline.json)
- emit-time output timing via new ModuleRendered/ModuleRenderedReady
  actions with Instants carried on LogCommand::Write
- transform no-op calls detected by a (len, hash) fingerprint of
  start-vs-end content; surfaced per hook in timing.md
- modes stay exclusive by design: the event log is a DevTools artifact and
  a combined sink fights the overhead budget
- node options: devtools.mode / metricsDir / metricsTopN / metricsDelta
- 12 unit/snapshot tests under serde_json/arbitrary_precision (the
  binding''s unified feature set)
…trics options

The `devtools.mode` / `metricsDir` / `metricsTopN` / `metricsDelta` options
reached `binding.d.cts` but not the wasi mirror, and the CLI help snapshots
still predate them.

Claude-Session: https://claude.ai/code/session_01QxznPFs9VmumUSf7hJYDVK
`metrics` named the content, not what the option writes. The option writes
a report (`metrics.json`, markdown views, `history.jsonl`, `AGENTS.md`), so
the mode is now `'report'` and its options follow: `reportDir`, `reportTopN`,
`reportDelta`. The default directory is `node_modules/.rolldown/report`.

Rust now rejects any other `devtools.mode`. Before, an unknown value fell
back to the full JSON-lines log, which can be several GB, and the TS
validator only printed a warning.
…eport options

Report mode now writes to `node_modules/.rolldown/report/<output dir>`, so the
client and the SSR build of one app no longer overwrite one report, and each
output finds its previous report for the delta. `reportDir`, `reportTopN` and
`reportDelta` are removed: the folder comes from the output folder, and the
top-N bound and the delta keep their defaults.
#11342 renamed `RenderedModule::rendered_length` to
`rendered_byte_length`. The value is the same UTF-8 byte length, which
is the unit of the report.
The implementation doc knew only the full mode: no `mode` in its API
snippet, session folders as the only output, no row for the report crate.
It now has a "Report mode" section with the per-output folder rule, the
files, the writer flow and why string deduplication does not apply; the
design doc points at it from the storage section. The option docs name
`module-graph.json`, the crate doc no longer says "or alongside" (the modes
are exclusive), and two writer comments say report-mode.
@IWANABETHATGUY
IWANABETHATGUY marked this pull request as ready for review October 29, 2026 01:56
@codspeed

codspeed Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

⚠️ 4 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 7 untouched benchmarks
⏩ 10 skipped benchmarks1


Comparing feat/devtools-build-metrics (0cc6cdc) with main (8a7874f)2

Open in CodSpeed

Footnotes

  1. 10 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on main (502e697) during the generation of this report, so 8a7874f was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@IWANABETHATGUY

Copy link
Copy Markdown
Member Author

Thanks for the PR! We're building MCP tooling for vite-devtools on top of rolldown's build data, and there are a couple of things we'd like to discuss for that use case:

1. Could full mode also emit the metrics report?

The devtools MCP is read-only by design — it never triggers builds, it just reads whatever the user's build produced. With full and metrics being mutually exclusive, users end up choosing between having the DevTools UI and having the MCP work, but those two consumers are usually the same person, same project, same build.

Since the metrics aggregation happens in memory over the same event stream, the marginal cost of emitting metrics on top of full mode should mostly be writing a few small files at the end. So instead of exclusive modes, could the two be composable — e.g. full mode also emits metrics, by default or opt-in? One build would then serve both the UI (event logs) and agents (metrics). Metrics-only still makes total sense for agent loops where you want to skip the full-log overhead — we really like that part.

One small related ask: a reliable way to correlate the metrics output with the corresponding session. When both are present, the flow we have in mind is "use metrics to locate the problem fast, then drill into that session's event logs for details" — which needs a link between the two. That could be nesting the metrics output under the session folder, or including the session id in metrics.json and history.jsonl — whichever fits the design better (though history.jsonl probably wants it either way, since buildIndex resets per session and lines from different sessions would collide).

2. A few extra fields

We checked the metrics output against what our existing analysis tools need. The following seem to already exist in the internal aggregation structs — they're just not exported:

module-graph.json (it's already the "filter it, never load it whole" file, so per-node fields shouldn't conflict with the condensed-report design):

  • package on each module node (the package it belongs to, name@version). The event stream already has this via MPackage.modules. We need it to answer "why is package X in my bundle" (package-target dependency trace) — without it we're stuck inferring from node_modules paths, which falls apart with pnpm and monorepos.
  • chunk on each module node (the chunk file it ended up in). We need it for chunk/asset-target traces, "which chunks contain this module", and initial/async classification. One field covers all of these, and avoids exporting a full chunk→modules list in metrics.json (which admittedly wouldn't fit the condensed design).
  • Keep the import kind (or at least a static/dynamic flag) on imports edges — if they're currently serialized down to bare module ids. We need it to mark dynamic boundaries along trace paths.

metrics.json:

  • entryModule on chunks.largest[] (ChunkAgg already has it). Lets us go from a chunk or asset back to its entry module.
  • Truncation markers on the top-N lists (truncated: true or a totalCount). An agent needs to know whether something is missing or just not listed, so it can decide when to drill into module-graph.json or the full logs. Related question: is the assets array complete, or capped at top-N as well?
  • The full plugin list in session ([{ index, name }]). Right now there's only pluginCount, so plugins that never had a hook called are invisible, and we can't reliably answer "which plugins were in this build".

There are two more module-level things we'd use — the per-module transform size chain (before/after, for attributing transform bloat and estimating tree-shaking) and per-module resolve/load timings (for pinpointing modules under load/resolve-heavy plugins) — but we get that those might be out of scope for a condensed report. Happy to open a separate issue for them; on the MCP side we can fall back to the full logs for now.

#11362

tracked here.

@IWANABETHATGUY
IWANABETHATGUY merged commit c9e8b54 into main Oct 29, 2026
38 checks passed
@IWANABETHATGUY
IWANABETHATGUY deleted the feat/devtools-build-metrics branch October 29, 2026 12:07
IWANABETHATGUY added a commit that referenced this pull request Oct 29, 2026
)

Adds `@rolldown/perf-kit` (private), a zero-dependency CLI that drives
headless Chromium over CDP against a built app so that an agent can
measure the page-load effect of a change instead of inferring it from
the build report. The published rolldown package does not bundle the
lab.

requires #10364

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
@rolldown-guard rolldown-guard Bot mentioned this pull request Oct 29, 2026
shulaoda added a commit that referenced this pull request Oct 29, 2026
## [1.2.16] - 2026-10-29

### 🚀 Features

- perf-kit: check rendered output against the original build (#11140) by @IWANABETHATGUY
- perf-kit: node/deno server startup mode (#10601) by @IWANABETHATGUY
- perf-kit: browser page-load perf harness for coding agents (#10365) by @IWANABETHATGUY
- devtools: report mode - agent-readable build metrics report (#10364) by @IWANABETHATGUY
- inline-common-chunks: print record factories parenthesized so they compile eagerly (#11282) by @mattlewis92
- fold `'key' in ns` on namespace imports with statically known exports (#11333) by @danielroe
- inline-common-chunks: inline chunks using `import.meta.hot` in dev mode (#11339) by @hyfdev
- support `experimentalInlineCommonChunks` in dev mode (#11335) by @hyfdev
- use `INVALID_TLA_FORMAT` error for Rollup compatibility (#11266) by @sapphi-red

### 🐛 Bug Fixes

- await bundle.close() in loadConfig and clean up every generated config file (#10347) by @Brooooooklyn
- deps: update mimalloc-safe to 0.1.69 (#11376) by @shulaoda
- transform: don't crash when the working directory has been deleted (#11352) by @shulaoda
- import-glob: follow directory symlinks on the wasm binding (#10624) by @hyfdev
- tree-shaking: preserve exported rest bindings from dynamic imports (#11365) by @shuvroroy
- transform: report `tsconfigFilePaths` for a tsconfig resolved through `TsconfigCache` (#11346) by @cainrus
- tsconfig: don't apply tsconfig when resolving imports from virtual modules (#11089) by @rubas
- code-splitting: handle emitted entries the same as `input` entries when placing the runtime (#11353) by @IWANABETHATGUY
- error: make Diagnostic::add_file idempotent (#10610) by @Nic-Polumeyv
- avoid retaining callable builtin callback owners (#10961) by @IWANABETHATGUY
- code-splitting: only host the runtime in a chunk that every consumer's entries load (#11293) by @IWANABETHATGUY
- code-splitting: keep the source order of chunk imports (#11298) by @IWANABETHATGUY
- dev: don't treat a wrapped module's init as a no-op in dev mode (#11334) by @hyfdev
- treat `cwd` as a literal path in relative glob filters (#11291) by @onmax
- deps: update emnapi to 2.0.0-beta.2 and pin `@napi-rs/wasm-runtime` to 1.2.6 (#11292) by @IWANABETHATGUY
- chunk-import-map: hash stable module ids so keys don't depend on the build folder (#11277) by @mandyheg
- respect CPU limits when sizing native runtime workers (#11280) by @Brooooooklyn
- deconflict the namespace of a module without module syntax (#11256) by @IWANABETHATGUY
- code-splitting: rebuild an absorbed dynamic entry's namespace from what its imports read (#11200) by @mattlewis92
- escape line terminators in debug-info comments (#11258) by @IWANABETHATGUY

### 🚜 Refactor

- extract callable builtin hook wrapper (#10964) by @IWANABETHATGUY

### 📚 Documentation

- add an in-depth explanation for inline common chunks (#11239) by @hyfdev

### ⚡ Performance

- incremental cycle check for `avoidRedundantChunkLoads` (#11320) by @IWANABETHATGUY
- avoid copying module code for `renderedLength` and share `chunk.code` across plugins (#11342) by @IWANABETHATGUY
- count UTF-16 lengths with `simd-utf16-len` (#11259) by @IWANABETHATGUY
- don't load consola when importing rolldown (#11257) by @magurotuna

### 🧪 Testing

- dev: cover hot updates that need modules the tab never received (#9647) by @matthewdavis-oai
- dev: add dynamic import rebuild test (#7123) by @sapphi-red
- code-splitting: import file URLs in fresh-process runtime host tests on Windows (#11354) by @shulaoda
- esbuild: mark loader_data_url_base64_invalid_utf8 as an intentional difference (#10790) by @CoderSerio
- watch: fix flaky `watch buildDelay` (#11175) by @Brooooooklyn

### ⚙️ Miscellaneous Tasks

- install `cmake-core` instead of the `cmake` metapackage on FreeBSD (#11361) by @shulaoda
- deps: update oxc to 0.156.0 (#11326) by @Dunqing
- stop the Discord notification when the metric workflow fails (#11357) by @IWANABETHATGUY
- connect to the Void platform before the docs deploy (#11350) by @shulaoda
- deps: update rust crates (#11297) by @renovate[bot]
- deps: update dependency vite-plus to v1.4.0 (#11288) by @renovate[bot]
- deps: update npm packages (#11296) by @renovate[bot]
- deps: update napi (#11287) by @renovate[bot]
- deps: update rollup submodule for tests to v4.65.1 (#11331) by @rolldown-guard[bot]
- deps: update test262 submodule for tests (#11332) by @rolldown-guard[bot]
- deps: update dependency rolldown-plugin-dts to v0.28.8 (#11286) by @renovate[bot]
- deps: bump tokio to 1.53.3 (#11317) by @Brooooooklyn

### ❤️ New Contributors

* @mattlewis92 made their first contribution in [#11282](#11282)
* @shuvroroy made their first contribution in [#11365](#11365)
* @cainrus made their first contribution in [#11346](#11346)
* @matthewdavis-oai made their first contribution in [#9647](#9647)
* @rubas made their first contribution in [#11089](#11089)
* @danielroe made their first contribution in [#11333](#11333)
* @onmax made their first contribution in [#11291](#11291)
* @mandyheg made their first contribution in [#11277](#11277)
* @magurotuna made their first contribution in [#11257](#11257)

Co-authored-by: shulaoda <[email protected]>
IWANABETHATGUY added a commit that referenced this pull request Nov 2, 2026
The report counted no-op hook calls per plugin and hook since #10364 but
drew no conclusion from them. Now:

- `metrics.json` → `noopHooks`: every (plugin, hook) with no-op calls,
the highest share first, capped like the other lists.
- `plugins.noop_hook_count`: hooks whose every call was a no-op;
`delta`, `baselineDelta` and `history.jsonl` track it.
- `timing.md` → "Hooks that did no work": the top 10 by share, marked
"all" at 1, "most" at or above 0.9, the percentage otherwise, with the
fix next to them (a hook filter).
- `entry.md` gets one lead line when the count is above zero.

No threshold option: the list carries the ratio, and #10364 removed the
report options.

Closes #11359.
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