Skip to content

--cpu-prof-name 'CPU.${pid}.cpuprofile' doesn't replace the placeholder #57418

Open
@BourgoisMickael

Description

@BourgoisMickael

Version

v22.13.0

Platform

Linux xps 6.8.0-52-generic #53~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jan 15 19:18:46 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

node -p process.pid --cpu-prof --cpu-prof-name 'CPU.${pid}.cpuprofile' && ls CPU*

outputs

43689
'CPU.${pid}.cpuprofile'

How often does it reproduce? Is there a required condition?

always

What is the expected behavior? Why is that the expected behavior?

Following the doc: https://nodejs.org/api/cli.html#--cpu-prof

If --cpu-prof-name is not specified, the generated profile is named CPU.${yyyymmdd}.${hhmmss}.${pid}.${tid}.${seq}.cpuprofile.

I expect to be able to use those placeholder when I specify a name, especially when I use the cluster module to avoid having all the profiling overriding each others.

I expected the filename to be CPU.43689.cpuprofile

What do you see instead?

'CPU.${pid}.cpuprofile'

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to the documentations.feature requestIssues that request new features to be added to Node.js.good first issueIssues that are suitable for first-time contributors.

    Type

    No type

    Projects

    Status

    Awaiting Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions