We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Here's the prototype:
@cli.command() @click.argument("url") @click.option( "-a", "--auth", type=click.File("r"), help="Path to JSON authentication context file", ) def snapshot(url, auth): "Return a heap snapshot of the specified URL" url = url_or_file_path(url, _check_and_absolutize) with sync_playwright() as p: context, browser_obj = _browser_context( p, auth, # browser=browser, # user_agent=user_agent, # reduced_motion=reduced_motion, ) page = context.new_page() client = page.context.new_cdp_session(page) chunks = [] def store_chunk(chunk): chunks.append(chunk["chunk"]) client.on("HeapProfiler.addHeapSnapshotChunk", store_chunk) page.goto(url) client.send("HeapProfiler.takeHeapSnapshot", {}) combined = "".join(chunks) data = json.loads(combined) click.echo(json.dumps(data, indent=2))
The text was updated successfully, but these errors were encountered:
@simonw I've ported the original project to Python & Playwright https://github.com/byt3bl33d3r/playwright-heap-snapshot
Feel free to steal
Sorry, something went wrong.
No branches or pull requests
Here's the prototype:
The text was updated successfully, but these errors were encountered: