diff --git a/doc/api/cli.md b/doc/api/cli.md index a2c92b13341df0..c26177444c7894 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -75,6 +75,37 @@ $ node --completion-bash > node_bash_completion $ source node_bash_completion ``` +### `--cpu-prof` + + +> Stability: 1 - Experimental + +Starts the V8 CPU profiler on start up, and writes the CPU profile to disk +before exit. If `--cpu-prof-path` is not specified, the profile will be +written to `${cwd}/CPU.${yyyymmdd}.${hhmmss}.${pid}.${tid}.${seq}.cpuprofile`. + +```console +$ node --cpu-prof index.js +$ ls *.cpuprofile +CPU.20190409.202950.15293.0.0.cpuprofile +``` + +### `--cpu-prof-path` + + +> Stability: 1 - Experimental + +Location where the CPU profile generated by `--cpu-prof` +should be written to. When used alone, it implies `--cpu-prof`. + +```console +$ node --cpu-prof-path /tmp/test.cpuprofile index.js +``` + ### `--diagnostic-report-directory=directory`