Skip to content

[Question] How to take heap snapshot #20246

Description

@Smrtnyk

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions