doc: add document for profiling and heap snapshot

PR-URL: https://github.com/nodejs/node/pull/46787
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
cola119 authored and Antoine du Hamel committed 2023-02-23 16:30:34 +01:00
1 parent c2c61e06a3
commit 5c7b81d0b7
1 file changed
+7
+7
View File
@@ -202,6 +202,13 @@ debug>
* `repl`: Open debugger's repl for evaluation in debugging script's context
* `exec expr`, `p expr`: Execute an expression in debugging script's context and
print its value
* `profile`: Start CPU profiling session
* `profileEnd`: Stop current CPU profiling session
* `profiles`: List all completed CPU profiling sessions
* `profiles[n].save(filepath = 'node.cpuprofile')`: Save CPU profiling session
to disk as JSON
* `takeHeapSnapshot(filepath = 'node.heapsnapshot')`: Take a heap snapshot
and save to disk as JSON
### Execution control