From d7faf6d601ae49aa64ef80ec63d85e67cbaed910 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 --- doc/api/debugger.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/api/debugger.md b/doc/api/debugger.md index 8c91a10ddd8b36..203e25587d95e8 100644 --- a/doc/api/debugger.md +++ b/doc/api/debugger.md @@ -199,6 +199,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