-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
--cpu-prof-name 'CPU.${pid}.cpuprofile' doesn't replace the placeholder #57418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It looks like either a misunderstanding of what the doc says, or that the doc not being clear enough that the argument is not a pattern that will be filled by Node.js. The doc specifically says:
which is not to be interpreted as "if it IS specified, Node.js will fill in the blank using a user-provided pattern". Rather, it means "if it IS specified, the name provided will be used as-is". |
labeling good first issue, I think it should be fixed by clarifying the docs that what's expected in the OP is not going to happen instead. |
@joyeecheung could we have it as a feature to be able to use a pattern with placeholder in the name ? Otherwise, using it with the cluster module, each process would overwrite the same file. |
@BourgoisMickael I was writing the docs and trying out the parameter myself. Calling EDIT: after trying it on wsl, using double quotes I get a file with the name |
@cecia234 The Using double quotes or no quotes will trigger the substitution and replace it with the value of the variable So on linux you end up sending It doesn't seem like a big change to be able to handle pattern as name if it's already available when name is not provided |
Oof, I didn't know that I'm sorry. |
I added the |
I’d like to work on this. Any guidance? |
Hello there ! |
Refs: #57418 PR-URL: #57433 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Refs: #57418 PR-URL: #57433 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Refs: #57418 PR-URL: #57433 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Refs: #57418 PR-URL: #57433 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Refs: nodejs#57418 PR-URL: nodejs#57433 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Refs: #57418 PR-URL: #57433 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Refs: #57418 PR-URL: #57433 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Refs: #57418 PR-URL: #57433 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Refs: #57418 PR-URL: #57433 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Refs: #57418 PR-URL: #57433 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Refs: #57418 PR-URL: #57433 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Refs: #57418 PR-URL: #57433 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Refs: #57418 PR-URL: #57433 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Refs: #57418 PR-URL: #57433 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
You can submit an PR directly ! |
Version
v22.13.0
Platform
Subsystem
No response
What steps will reproduce the bug?
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
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
The text was updated successfully, but these errors were encountered: