const profiler = new Profiler({ sampleInterval: 10, maxBufferSize: 100 });
profiler.addEventListener("samplebufferfull", async () => {
console.log("Sample buffer full!");
const trace = await profiler.stop();
console.log(JSON.stringify(trace));
});Profiler: samplebufferfull event / notebook
Profiler: samplebufferfull event
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.