--heap-prof


稳定性: 1 - 实验性

在启动时启动 V8 堆分析器,并在退出前将堆分析结果写入磁盘。

【Starts the V8 heap profiler on start up, and writes the heap profile to disk before exit.】

如果未指定 --heap-prof-dir,生成的配置文件将放置在当前工作目录中。

【If --heap-prof-dir is not specified, the generated profile is placed in the current working directory.】

如果未指定 --heap-prof-name,生成的配置文件将被命名为 Heap.${yyyymmdd}.${hhmmss}.${pid}.${tid}.${seq}.heapprofile

【If --heap-prof-name is not specified, the generated profile is named Heap.${yyyymmdd}.${hhmmss}.${pid}.${tid}.${seq}.heapprofile.】

$ node --heap-prof index.js
$ ls *.heapprofile
Heap.20190409.202950.15293.0.001.heapprofile