Skip to content

Commit 49fbad5

Browse files
committed
cli: add --cpu-prof-name example
1 parent 3104de4 commit 49fbad5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

doc/api/cli.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -495,14 +495,20 @@ in the current working directory.
495495
If `--cpu-prof-name` is not specified, the generated profile is
496496
named `CPU.${yyyymmdd}.${hhmmss}.${pid}.${tid}.${seq}.cpuprofile`.
497497

498-
If `--cpu-prof-name` is specified, the provided value will be used as-is; patterns such as `${hhmmss}` or `${pid}` are not supported.
499-
500498
```console
501499
$ node --cpu-prof index.js
502500
$ ls *.cpuprofile
503501
CPU.20190409.202950.15293.0.0.cpuprofile
504502
```
505503

504+
If `--cpu-prof-name` is specified, the provided value will be used as-is; patterns such as `${hhmmss}` or `${pid}` are not supported.
505+
506+
```console
507+
$ node --cpu-prof --cpu-prof-name 'CPU.${pid}.cpuprofile' index.js
508+
$ ls *.cpuprofile
509+
'CPU.${pid}.cpuprofile'
510+
```
511+
506512
### `--cpu-prof-dir`
507513

508514
<!-- YAML

0 commit comments

Comments
 (0)