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.38095% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.80%. Comparing base (8c3cf47) to head (ff06537).
⚠️ Report is 12 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.80%   -1.75%     
==========================================
  Files         355      700     +345     
  Lines      149296   216471   +67175     
  Branches    23371    41378   +18007     
==========================================
+ Hits       136678   194409   +57731     
- Misses      12353    14146    +1793     
- Partials      265     7916    +7651     
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 84.98% <100.00%> (ø)
src/env.h 98.14% <ø> (ø)
src/node_v8.cc 82.34% <100.00%> (ø)
src/node_worker.cc 82.02% <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 462 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
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