-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
Support --cpu-prof in NODE_OPTIONS #56944
Copy link
Copy link
Closed
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Awaiting Triage
What is the problem this feature will solve?
I'm unclear why
--heap-prof,--perf-prof, and--perf-basic-profare allowed in NODE_OPTIONS, but--cpu-profis not.I'm running afoul of this when trying to collect CPU profiles of monorepo builds, in which thousands of individual NodeJS processes are invoked via npm scripts.
What is the feature you are proposing to solve the problem?
Allow
--cpu-profto be passed inNODE_OPTIONSso that the profiler can be enabled when invoking NodeJS child processes via bin stubs.What alternatives have you considered?
I have ways of having the orchestrator rewrite the CLI invocations to the child processes, but it becomes confusing when NodeJS is invoked via bin aliases for installed npm packages.