I am trying to do some memory profiling using playwright and chromium CDP.
The issue I am facing is that the profile is always returning an empty object.
This is what I tried
test.only("heap snapshot", async ({ page }) => {
const client = await page.context().newCDPSession(page);
await page.goto("https://www.dynatrace.com/");
await client.send("HeapProfiler.enable");
await page.waitForTimeout(1000);
const profile = await client.send("HeapProfiler.takeHeapSnapshot");
console.log(profile);
});
Am I maybe missing some steps?
I am trying to do some memory profiling using playwright and chromium CDP.
The issue I am facing is that the profile is always returning an empty object.
This is what I tried
Am I maybe missing some steps?