New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add memory heap snapshot API #304
Comments
@ak239 is claiming this! |
This patch introduces Page.queryObjects and ExecutionContext.queryObjects methods to query JavaScript heap for objects with a certain prototype. Fixes puppeteer#304.
This patch introduces `Page.queryObjects` and `ExecutionContext.queryObjects` methods to query JavaScript heap for objects with a certain prototype. Fixes #304.
This patch introduces `Page.queryObjects` and `ExecutionContext.queryObjects` methods to query JavaScript heap for objects with a certain prototype. Fixes puppeteer#304.
Amazing - any snippet available to get quickly started on memory leak testing? So amazing I've been waiting for that for years! |
@NicolasRannou we have a small demo in the api docs: |
Thanks a lot I missed that! |
I don't quite see how the referenced PR really resolved this issue. In order for the |
Problem
I see there is an API for starting and stoping a timeline recording
await page.tracing.start({path: 'trace.json'});
but I would like to request the ability to take a memory heap snapshot and the ability to write expectations on the snapshot data.My use case is roughly:
This would be amazing to be able to have automated headless memory leak regression testing!
Maybe something like:
Bonus points for an API for the memory allocation timeline that you could query for the number of objects of a type added / removed during the timeline.
The text was updated successfully, but these errors were encountered: