summaryrefslogtreecommitdiff
path: root/doc/api/cli.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/cli.md')
-rw-r--r--doc/api/cli.md51
1 files changed, 51 insertions, 0 deletions
diff --git a/doc/api/cli.md b/doc/api/cli.md
index e76a3296f0..3dbb230c87 100644
--- a/doc/api/cli.md
+++ b/doc/api/cli.md
@@ -245,6 +245,57 @@ new X();
added: v12.0.0
-->
+### `--heap-prof`
+<!-- YAML
+added: REPLACEME
+-->
+
+> Stability: 1 - Experimental
+
+Starts the V8 heap profiler on start up, and writes the heap profile to disk
+before exit.
+
+If `--heap-prof-dir` is not specified, the generated profile will be placed
+in the current working directory.
+
+If `--heap-prof-name` is not specified, the generated profile will be
+named `Heap.${yyyymmdd}.${hhmmss}.${pid}.${tid}.${seq}.heapprofile`.
+
+```console
+$ node --heap-prof index.js
+$ ls *.heapprofile
+Heap.20190409.202950.15293.0.001.heapprofile
+```
+
+### `--heap-prof-dir`
+<!-- YAML
+added: REPLACEME
+-->
+
+> Stability: 1 - Experimental
+
+Specify the directory where the heap profiles generated by `--heap-prof` will
+be placed.
+
+### `--heap-prof-interval`
+<!-- YAML
+added: REPLACEME
+-->
+
+> Stability: 1 - Experimental
+
+Specify the average sampling interval in bytes for the heap profiles generated
+by `--heap-prof`. The default is 512 * 1024 bytes.
+
+### `--heap-prof-name`
+<!-- YAML
+added: REPLACEME
+-->
+
+> Stability: 1 - Experimental
+
+Specify the file name of the heap profile generated by `--heap-prof`.
+
Generates a heap snapshot each time the process receives the specified signal.
`signal` must be a valid signal name. Disabled by default.