FstartCPUProfile
Bun

function

v8.startCPUProfile

Starting a CPU profile then return a SyncCPUProfileHandle object. This API supports using syntax.

const handle = v8.startCpuProfile();
const profile = handle.stop();
console.log(profile);

Referenced types

interface SyncCPUProfileHandle

  • Stopping collecting the profile and the profile will be discarded.

  • stop(): string;

    Stopping collecting the profile and return the profile data.