fix(dev): time startup phases + stop hook names leaking into labels - #1495
Conversation
commit: |
CLI benchmark
Full report
|
| Setting | Value |
|---|---|
| Baseline | ref:1b8752993b5d5cb59084443b84ce06d885f9219c (v4.0.0-alpha.0) |
| Head | local packages/nuxt-cli at 46b7793 (v4.0.0-alpha.0) |
| Node | v24.19.0 |
| OS | Linux 6.17.0 (kernel 6.17.0-1022-azure) |
| CPU | AMD EPYC 9V74 80-Core Processor x 4 |
| Memory | 15.6 GB |
| Load average at start | 0.93, 0.29, 0.10 |
| Run started | 2026-08-25T17:14:40.475Z |
Cold CLI startup
Median of 15 interleaved runs per command, one warmup discarded.
| Command | baseline v4.0.0-alpha.0 median | head v4.0.0-alpha.0 median | Delta | baseline v4.0.0-alpha.0 min / p95 | head v4.0.0-alpha.0 min / p95 |
|---|---|---|---|---|---|
nuxt --version |
70 ms | 70 ms | +0.9% | 67 ms / 77 ms | 68 ms / 74 ms |
nuxt --version (first output byte) |
65 ms | 65 ms | +0.1% | 62 ms / 72 ms | 63 ms / 69 ms |
nuxt --help |
145 ms | 144 ms | -0.3% | 141 ms / 151 ms | 138 ms / 162 ms |
nuxt --help (first output byte) |
138 ms | 138 ms | -0.4% | 135 ms / 144 ms | 132 ms / 154 ms |
nuxt dev --help |
110 ms | 113 ms | +2.0% | 107 ms / 124 ms | 108 ms / 118 ms |
nuxt dev --help (first output byte) |
104 ms | 107 ms | +2.6% | 102 ms / 118 ms | 102 ms / 112 ms |
nuxt <unknown-command> (no-op) |
156 ms | 154 ms | -1.3% | 150 ms / 167 ms | 150 ms / 162 ms |
nuxt <unknown-command> (no-op) (first output byte) |
150 ms | 147 ms | -1.7% | 144 ms / 160 ms | 144 ms / 155 ms |
Module load cost
Counted with a module.registerHooks load hook, compile cache disabled. Counts every JS module actually evaluated on that code path (built-ins excluded, native addons excluded).
| Command | baseline v4.0.0-alpha.0 modules | head v4.0.0-alpha.0 modules | Delta | baseline v4.0.0-alpha.0 source bytes | head v4.0.0-alpha.0 source bytes | Delta |
|---|---|---|---|---|---|---|
nuxt --version |
38 | 38 | 0.0% | 298.1 kB | 298.1 kB | 0.0% |
nuxt --help |
134 | 134 | 0.0% | 1002.9 kB | 1007.6 kB | +0.5% |
nuxt dev --help |
79 | 79 | 0.0% | 604.3 kB | 608.9 kB | +0.8% |
Install footprint and published tarball
Each version installed on its own into an empty project with nothing but @nuxt/cli as a dependency, so the tree is exactly the CLI and its transitive dependencies. npm cache is warm and the registry is only consulted for metadata, so install wall time is indicative, not a network benchmark.
| Metric | baseline v4.0.0-alpha.0 | head v4.0.0-alpha.0 | Delta |
|---|---|---|---|
Direct dependencies of @nuxt/cli |
21 | 21 | 0.0% |
| Packages in the installed tree (unique name@version) | 34 | 34 | 0.0% |
| Unique package names | 34 | 34 | 0.0% |
| Package directories on disk (cross-check) | 28 | 28 | 0.0% |
Installed node_modules on disk |
2.35 MB | 2.36 MB | +0.2% |
| Installed files | 418 | 418 | 0.0% |
| Install wall time (warm npm cache, median of 3) | 712 ms | 675 ms | -5.2% |
| Published tarball (packed) | 277.9 kB | 279.7 kB | +0.6% |
| Published tarball (unpacked) | 960.5 kB | 966.5 kB | +0.6% |
| Files in tarball | 130 | 130 | 0.0% |
Interleaved runs on a shared runner: trust the deltas, not the absolute timings. The dev, restart and build suites run locally via pnpm bench:cli.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe startup progress system now tracks elapsed time for the current phase. Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to This PR changes startup progress reporting and spinner output without any identified merge-blocking risk; it is ready to merge after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 47.37% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 19 functions across 14 files. (2 skipped: 2 unsupported.) ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
2ac8758 to
0d91904
Compare
🔗 Linked issue
📚 Description
testing the new cli on npmx.dev, 33s of a 41s startup sat on
Generating typesthis PR gives every phase its own timer + ignores any hook that was already running when the phase began. hook names themselves are mapped to labels (
modules:donetofinishing module setup,nitro:rollup:beforetobundling the server, and so on) and anything in a Nuxt/Nitro/bundler namespace without a label isn't narrated at all; a hook outside those namespaces still shows ...two smaller things:
Setting up modulescounts what has installed (setting up modules · 4 installed) - and when v4.6 ships, we'll get module names too.