Skip to content

v8: add cpu profile options#62684

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

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.38095% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.81%. Comparing base (8c3cf47) to head (d360041).
⚠️ Report is 7 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% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #62684      +/-   ##
==========================================
- Coverage   91.54%   89.81%   -1.74%     
==========================================
  Files         355      700     +345     
  Lines      149296   216406   +67110     
  Branches    23371    41366   +17995     
==========================================
+ Hits       136678   194366   +57688     
- Misses      12353    14153    +1800     
- Partials      265     7887    +7622     
Files with missing lines Coverage Δ
lib/internal/worker.js 96.65% <100.00%> (+0.17%) ⬆️
lib/v8.js 98.24% <100.00%> (-0.51%) ⬇️
src/env.cc 85.13% <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 458 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
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