Skip to content

Comments

Implement additional debugging in prelude#1043

Merged
marcins merged 3 commits intomainfrom
mszczepanski/native-pkg-more-prelude-tools
Feb 24, 2026
Merged

Implement additional debugging in prelude#1043
marcins merged 3 commits intomainfrom
mszczepanski/native-pkg-more-prelude-tools

Conversation

@marcins
Copy link
Contributor

@marcins marcins commented Feb 24, 2026

Motivation

I wanted more information about timings / performance from the new packager prelude.

Changes

  • added registration / execution count metrics to the dev prelude
  • added timing metrics to the debug prelude
  • move logging to in-memory to avoid spamming the console - can inspect the logs async later instead

Checklist

  • Existing or new tests cover this change
  • There is a changeset for this change, or one is not required
  • Added documentation for any new features to the docs/ folder

@marcins marcins requested a review from a team as a code owner February 24, 2026 02:09
@changeset-bot
Copy link

changeset-bot bot commented Feb 24, 2026

🦋 Changeset detected

Latest commit: 3605a20

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 112 packages
Name Type
@atlaspack/rust Patch
@atlaspack/bundler-default Patch
atlaspack Patch
@atlaspack/cache Patch
@atlaspack/core Patch
@atlaspack/e2e-tests Patch
@atlaspack/fs Patch
@atlaspack/logger Patch
@atlaspack/source-map Patch
@atlaspack/utils Patch
@atlaspack/link Patch
@atlaspack/packaging-test-harness Patch
@atlaspack/optimizer-image Patch
@atlaspack/optimizer-inline-requires Patch
@atlaspack/packager-js Patch
@atlaspack/transformer-compiled-css-in-js Patch
@atlaspack/transformer-html Patch
@atlaspack/transformer-js Patch
@atlaspack/transformer-postcss Patch
@atlaspack/transformer-svg Patch
@atlaspack/transformer-tokens Patch
@atlaspack/node-resolver-core Patch
@atlaspack/config-default Patch
@atlaspack/test-utils Patch
@atlaspack/inspector Patch
@atlaspack/query Patch
@atlaspack/config-webextension Patch
@atlaspack/cli Patch
@atlaspack/register Patch
@atlaspack/bundle-stats Patch
@atlaspack/reporter-bundle-stats Patch
@atlaspack/transformer-image Patch
@atlaspack/inspector-frontend Patch
@atlaspack/package-manager Patch
@atlaspack/profiler Patch
@atlaspack/workers Patch
@atlaspack/watcher-watchman-js Patch
@atlaspack/types-internal Patch
@atlaspack/optimizer-css Patch
@atlaspack/optimizer-cssnano Patch
@atlaspack/optimizer-swc Patch
@atlaspack/optimizer-terser Patch
@atlaspack/packager-css Patch
@atlaspack/transformer-babel Patch
@atlaspack/transformer-compiled-external Patch
@atlaspack/transformer-compiled Patch
@atlaspack/transformer-css Patch
@atlaspack/transformer-less Patch
@atlaspack/transformer-sass Patch
@atlaspack/transformer-typescript-tsc Patch
@atlaspack/transformer-typescript-types Patch
@atlaspack/optimizer-blob-url Patch
@atlaspack/optimizer-data-url Patch
@atlaspack/optimizer-svgo Patch
@atlaspack/packager-html Patch
@atlaspack/packager-raw-url Patch
@atlaspack/packager-svg Patch
@atlaspack/packager-webextension Patch
@atlaspack/packager-xml Patch
@atlaspack/reporter-build-metrics Patch
@atlaspack/reporter-bundle-analyzer Patch
@atlaspack/reporter-cli Patch
@atlaspack/reporter-dev-server Patch
@atlaspack/reporter-json Patch
@atlaspack/reporter-lsp Patch
@atlaspack/reporter-sourcemap-visualiser Patch
@atlaspack/reporter-tracer Patch
@atlaspack/resolver-glob Patch
@atlaspack/runtime-browser-hmr Patch
@atlaspack/runtime-js Patch
@atlaspack/runtime-react-refresh Patch
@atlaspack/runtime-service-worker Patch
@atlaspack/runtime-webextension Patch
@atlaspack/transformer-posthtml Patch
@atlaspack/transformer-react-refresh-wrap Patch
@atlaspack/transformer-webextension Patch
@atlaspack/transformer-webmanifest Patch
@atlaspack/validator-eslint Patch
@atlaspack/validator-typescript Patch
@atlaspack/resolver-default Patch
@atlaspack/resolver-tesseract Patch
@atlaspack/types Patch
@atlaspack/codeframe Patch
@atlaspack/graph Patch
@atlaspack/plugin Patch
@atlaspack/reporter-bundle-buddy Patch
@atlaspack/transformer-xml Patch
@atlaspack/ts-utils Patch
@atlaspack/packager-ts Patch
@atlaspack/transformer-jsonld Patch
@atlaspack/bundler-library Patch
@atlaspack/compressor-brotli Patch
@atlaspack/compressor-gzip Patch
@atlaspack/compressor-raw Patch
@atlaspack/namer-default Patch
@atlaspack/optimizer-htmlnano Patch
@atlaspack/packager-raw Patch
@atlaspack/packager-wasm Patch
@atlaspack/reporter-compiled-css-in-js-migration-map Patch
@atlaspack/reporter-conditional-manifest Patch
@atlaspack/transformer-glsl Patch
@atlaspack/transformer-graphql Patch
@atlaspack/transformer-inline-string Patch
@atlaspack/transformer-inline Patch
@atlaspack/transformer-json Patch
@atlaspack/transformer-mdx Patch
@atlaspack/transformer-pug Patch
@atlaspack/transformer-raw Patch
@atlaspack/transformer-svg-react Patch
@atlaspack/transformer-toml Patch
@atlaspack/transformer-worklet Patch
@atlaspack/transformer-yaml Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Feb 24, 2026

📊 Type Coverage Report

Coverage Comparison

Metric Baseline Current Change
Coverage Percentage 92.22% 92.22% ➡️ 0.00%
Correctly Typed 220,178 220,222 +44
Total Expressions 238,746 238,788 +42
Untyped Expressions 18,568 18,566 -2

Files with Most Type Issues (Top 15)

File Issues Affected Lines
packages/core/integration-tests/test/javascript.ts 1152 745
packages/core/integration-tests/test/cache.ts 884 625
packages/core/integration-tests/test/scope-hoisting.ts 622 489
packages/utils/node-resolver-core/test/resolver.ts 476 177
packages/core/integration-tests/test/html.ts 468 294
packages/core/integration-tests/test/sourcemaps.ts 364 182
packages/core/test-utils/src/utils.ts 330 205
packages/core/integration-tests/test/incremental-bundling.ts 298 206
packages/core/core/src/dumpGraphToGraphViz.ts 251 108
packages/core/integration-tests/test/transpilation.ts 230 139
packages/core/integration-tests/test/output-formats.ts 227 161
packages/transformers/webextension/src/WebExtensionTransformer.ts 210 80
packages/core/core/src/requests/BundleGraphRequestRust.ts 194 67
packages/core/integration-tests/test/css-modules.ts 191 107
packages/core/core/src/requests/TargetRequest.ts 190 133

This report was generated by the Type Coverage GitHub Action

@github-actions
Copy link
Contributor

github-actions bot commented Feb 24, 2026

📊 Benchmark Results

🎉 Performance improvements detected!

📊 Benchmark Results

Overall Performance

Test Duration JS Memory Peak Native Memory Peak vs Baseline Status
Three.js Real Repository (JS) 16.00s 1.79GB 1.88GB +2.38% duration, -8.75% JS memory 🟡 Neutral
Three.js Real Repository (V3) 20.18s 2.99GB 3.19GB -9.39% duration, -3.18% JS memory 🟢 Improvement

🔍 Detailed Phase Analysis

Three.js Real Repository (JS)

Phase Duration (avg) Duration (p95) Memory Peak (avg) Memory Peak (p95)
resolving 7.70s 8.24s 1.20GB 1.39GB
transforming 7.69s 8.24s 1.20GB 1.39GB
bundling 7.50s 8.04s 1.20GB 1.39GB
bundled 7.11s 7.67s 1.34GB 1.53GB
packaging 4.88s 5.23s 1.43GB 1.63GB
optimizing 4.70s 5.04s 1.79GB 1.96GB

Three.js Real Repository (V3)

Phase Duration (avg) Duration (p95) Memory Peak (avg) Memory Peak (p95)
bundling 11.69s 14.32s 2.28GB 2.61GB
bundled 11.33s 13.96s 2.46GB 2.78GB
packaging 6.23s 6.70s 2.58GB 2.84GB
optimizing 6.06s 6.49s 2.99GB 3.19GB

💾 Unified Memory Analysis

Three.js Real Repository (JS) Memory Statistics

Memory Type Metric Min Mean Median P95 P99 Max Std Dev
JavaScript RSS 1.10GB 1.59GB 1.63GB 1.96GB 1.96GB 1.96GB 242.30MB
Heap Used 80.53MB 88.85MB 90.13MB 103.74MB 103.74MB 103.74MB 7.54MB
Heap Total 96.35MB 131.77MB 128.85MB 179.12MB 179.12MB 179.12MB 21.25MB
External 38.88MB 116.78MB 173.02MB 190.50MB 190.50MB 190.50MB 67.61MB
Native (Rust) Physical Memory 1.35GB 1.54GB 1.56GB 1.74GB 1.83GB 1.88GB 148.85MB
Virtual Memory 29.82GB 30.46GB 30.49GB 30.74GB 30.80GB 30.93GB 190.55MB

Sample Counts: JS: 14, Native: 250

Three.js Real Repository (V3) Memory Statistics

Memory Type Metric Min Mean Median P95 P99 Max Std Dev
JavaScript RSS 2.29GB 2.73GB 2.77GB 3.19GB 3.19GB 3.19GB 306.75MB
Heap Used 77.45MB 77.92MB 77.94MB 78.30MB 78.30MB 78.30MB 0.23MB
Heap Total 86.20MB 89.21MB 88.70MB 94.45MB 94.45MB 94.45MB 2.66MB
External 179.70MB 182.60MB 185.49MB 185.49MB 185.49MB 185.49MB 2.89MB
Native (Rust) Physical Memory 2.52GB 2.80GB 2.83GB 3.06GB 3.19GB 3.19GB 160.81MB
Virtual Memory 30.71GB 33.25GB 33.51GB 33.73GB 33.85GB 33.85GB 747.79MB

Sample Counts: JS: 14, Native: 280

🖥️ Environment

  • Node.js: v22.17.0
  • Platform: linux (x64)
  • CPU: AMD EPYC 7763 64-Core Processor
  • Total Memory: 15.62GB
  • Git SHA: 3605a20
  • Branch: mszczepanski/native-pkg-more-prelude-tools
  • Timestamp: 2026-02-24T03:52:09.071Z

@marcins marcins enabled auto-merge (squash) February 24, 2026 02:52
@marcins marcins force-pushed the mszczepanski/native-pkg-more-prelude-tools branch from f7e8ee8 to 1972bcb Compare February 24, 2026 03:06
@marcins marcins merged commit a2c5747 into main Feb 24, 2026
24 of 25 checks passed
@marcins marcins deleted the mszczepanski/native-pkg-more-prelude-tools branch February 24, 2026 04:21
@atlaspack-ci atlaspack-ci bot mentioned this pull request Feb 24, 2026
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