Skip to content

v8: add cpu profile options#62684

Open
IlyasShabi wants to merge 1 commit intonodejs:mainfrom
IlyasShabi:ishabi/cpu-profile-options
Open

v8: add cpu profile options#62684
IlyasShabi wants to merge 1 commit intonodejs:mainfrom
IlyasShabi:ishabi/cpu-profile-options

Conversation

@IlyasShabi
Copy link
Copy Markdown
Member

Add options support to v8.startCpuProfile() and worker.startCpuProfile():

  • sampleInterval: requested sampling interval in milliseconds
  • maxBufferSize: maximum number of samples to retain

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Apr 10, 2026
@IlyasShabi IlyasShabi added the v8 module Issues and PRs related to the "v8" subsystem. label Apr 10, 2026
@IlyasShabi IlyasShabi marked this pull request as ready for review April 10, 2026 21:54
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 10, 2026

Codecov Report

❌ Patch coverage is 92.52336% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.68%. Comparing base (8c3cf47) to head (ad99597).
⚠️ Report is 24 commits behind head on main.

Files with missing lines Patch % Lines
src/util.cc 58.33% 0 Missing and 5 partials ⚠️
lib/internal/v8/cpu_profiler.js 94.64% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #62684      +/-   ##
==========================================
- Coverage   91.54%   89.68%   -1.87%     
==========================================
  Files         355      707     +352     
  Lines      149296   218221   +68925     
  Branches    23371    41747   +18376     
==========================================
+ Hits       136678   195712   +59034     
- Misses      12353    14417    +2064     
- Partials      265     8092    +7827     
Files with missing lines Coverage Δ
lib/internal/worker.js 96.65% <100.00%> (+0.17%) ⬆️
lib/v8.js 98.77% <100.00%> (+0.02%) ⬆️
src/env.cc 85.24% <100.00%> (ø)
src/env.h 98.14% <ø> (ø)
src/node_v8.cc 82.15% <100.00%> (ø)
src/node_worker.cc 82.12% <100.00%> (ø)
src/util.h 91.40% <100.00%> (ø)
lib/internal/v8/cpu_profiler.js 94.64% <94.64%> (ø)
src/util.cc 86.53% <58.33%> (ø)

... and 473 files with indirect coverage changes

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

@IlyasShabi IlyasShabi marked this pull request as draft April 12, 2026 17:54
@IlyasShabi IlyasShabi force-pushed the ishabi/cpu-profile-options branch from d360041 to ff06537 Compare April 12, 2026 18:32
@IlyasShabi IlyasShabi marked this pull request as ready for review April 12, 2026 18:49
@IlyasShabi IlyasShabi force-pushed the ishabi/cpu-profile-options branch from ff06537 to c49027e Compare April 14, 2026 09:31
@IlyasShabi IlyasShabi force-pushed the ishabi/cpu-profile-options branch from c49027e to ad99597 Compare April 14, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. v8 module Issues and PRs related to the "v8" subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants