syncHeapProfileHandle.stop()
- 返回:<string>
停止收集配置文件并返回配置文件数据。
🌐 Stopping collecting the profile and return the profile data.
返回的字符串是 Chrome DevTools 采样堆配置文件格式的 JSON,包含一个 head 调用树和一个 samples 数组。在 DevTools 字段的基础上,还添加了以下内容:
🌐 The returned string is JSON in the Chrome DevTools sampling heap profile
format, with a head call-tree and a samples array. On top of the DevTools
fields, the following are added:
- 每个节点报告
selfCount,即该节点分配的采样对象数量(selfSize是现有的总字节数)。 - 每个样本都会报告
objectSize、objectCount和isLive。
为了兼容,DevTools 的 size 字段保持为 objectSize * objectCount。
🌐 The DevTools size field stays objectSize * objectCount for compatibility.