Skip to content

Support --cpu-prof in NODE_OPTIONS #56944

Closed
@dmichon-msft

Description

@dmichon-msft

What is the problem this feature will solve?

I'm unclear why --heap-prof, --perf-prof, and --perf-basic-prof are allowed in NODE_OPTIONS, but --cpu-prof is 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-prof to be passed in NODE_OPTIONS so 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.

    Type

    No type

    Projects

    • Status

      Awaiting Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions