From 00edc50874149e3cfa9e5387d318c4ed0135b70a Mon Sep 17 00:00:00 2001 From: cola119 Date: Tue, 10 May 2022 06:43:28 +0900 Subject: [PATCH] doc: add document for profiling and heap snapshot PR-URL: https://github.com/nodejs/node/pull/46787 Reviewed-By: Rafael Gonzaga Reviewed-By: Rich Trott --- doc/api/debugger.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/api/debugger.md b/doc/api/debugger.md index 9ddab147139e26..84422a9e6f77cc 100644 --- a/doc/api/debugger.md +++ b/doc/api/debugger.md @@ -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