v8.startCpuProfile([options])
options<Object>- 返回:SyncCPUProfileHandle
启动 CPU 分析,然后返回一个 SyncCPUProfileHandle 对象。此 API 支持 using 语法。
🌐 Starting a CPU profile then return a SyncCPUProfileHandle object.
This API supports using syntax.
const handle = v8.startCpuProfile({ sampleInterval: 1, maxBufferSize: 10_000 });
const profile = handle.stop();
console.log(profile);