node icon indicating copy to clipboard operation
node copied to clipboard

Add SourceMap Benchmark

Open miguelmarcondesf opened this issue 7 months ago • 4 comments

Add SourceMap Benchmark

This PR introduces a new benchmark suite for the lib/internal/source_map module to help evaluate and explore the performance characteristics of the SourceMap.

I'm still learning how everything fits together, but this is a first step toward understanding where small improvements could improve performance.

cc @BridgeAR

miguelmarcondesf avatar May 02 '25 17:05 miguelmarcondesf

Review requested:

  • [ ] @nodejs/performance
  • [ ] @nodejs/tsc

nodejs-github-bot avatar May 02 '25 17:05 nodejs-github-bot

Local running with n: 1e5 for all cases:

image

miguelmarcondesf avatar May 03 '25 21:05 miguelmarcondesf

You need to add a test for these benchmarks. You can find similar ones in test folder.

anonrig avatar May 03 '25 22:05 anonrig

You need to add a test for these benchmarks. You can find similar ones in test folder.

Thank you, just pushed that!

miguelmarcondesf avatar May 04 '25 10:05 miguelmarcondesf

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.09%. Comparing base (04cb572) to head (c071304). Report is 93 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #58125      +/-   ##
==========================================
+ Coverage   90.07%   90.09%   +0.02%     
==========================================
  Files         640      640              
  Lines      188262   188262              
  Branches    36912    36911       -1     
==========================================
+ Hits       169580   169623      +43     
+ Misses      11399    11363      -36     
+ Partials     7283     7276       -7     

see 37 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar May 06 '25 17:05 codecov[bot]

CI: https://ci.nodejs.org/job/node-test-pull-request/67569/

nodejs-github-bot avatar Jun 20 '25 13:06 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/67620/

nodejs-github-bot avatar Jun 23 '25 13:06 nodejs-github-bot

Commit Queue failed
- Loading data for nodejs/node/pull/58125
✔  Done loading data for nodejs/node/pull/58125
----------------------------------- PR info ------------------------------------
Title      Add SourceMap Benchmark (#58125)
Author     Miguel Marcondes Filho <[email protected]> (@miguelmarcondesf)
Branch     miguelmarcondesf:performance-improvements-sourcemap -> nodejs:main
Labels     author ready, needs-ci, commit-queue-squash
Commits    3
 - benchmark: add source map and source map cache
 - benchmark: use fixtures for sourcemap cache
 - benchmark: use fixtures and avoid dead code for sourcemap
Committers 1
 - Miguel Marcondes <[email protected]>
PR-URL: https://github.com/nodejs/node/pull/58125
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Edy Silva <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/58125
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Edy Silva <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
--------------------------------------------------------------------------------
   ℹ  This PR was created on Fri, 02 May 2025 17:48:50 GMT
   ✔  Approvals: 4
   ✔  - Chengzhong Wu (@legendecas) (TSC): https://github.com/nodejs/node/pull/58125#pullrequestreview-2946108239
   ✔  - Edy Silva (@geeksilva97): https://github.com/nodejs/node/pull/58125#pullrequestreview-2950130654
   ✔  - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/58125#pullrequestreview-2952013937
   ✔  - Rafael Gonzaga (@RafaelGSS) (TSC): https://github.com/nodejs/node/pull/58125#pullrequestreview-2975274650
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2025-06-23T13:44:33Z: https://ci.nodejs.org/job/node-test-pull-request/67620/
   ⚠  Commits were pushed after the last Full PR CI run:
   ⚠  - benchmark: add source map and source map cache
   ⚠  - benchmark: use fixtures for sourcemap cache
   ⚠  - benchmark: use fixtures and avoid dead code for sourcemap
- Querying data for job/node-test-pull-request/67620/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/15999945215

nodejs-github-bot avatar Jul 01 '25 12:07 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/67778/

nodejs-github-bot avatar Jul 01 '25 20:07 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/67813/

nodejs-github-bot avatar Jul 03 '25 14:07 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/67843/

nodejs-github-bot avatar Jul 04 '25 17:07 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/67863/

nodejs-github-bot avatar Jul 07 '25 10:07 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/67870/

nodejs-github-bot avatar Jul 07 '25 14:07 nodejs-github-bot

Landed in 9c025a9287073ca616060b49c10ff6ca56c2358f

nodejs-github-bot avatar Jul 07 '25 15:07 nodejs-github-bot