Skip to content
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

Record CPU traces from screenshot runs #791

Merged
merged 1 commit into from
Jul 25, 2023
Merged

Conversation

Mike-Dax
Copy link
Contributor

@Mike-Dax Mike-Dax commented Jul 24, 2023

This builds on #790 and #789, happy to rebase as needed.

When debugging performance problems with screenshots, it's helpful to have a flamegraph of what's taking time.

It's difficult to mount a debugger into the internal story isolate. This PR enables a --trace cli option that records a Chromium CPU trace of the screenshot and saves it alongside the screenshot filename.png as filename_trace.json.

This trace can be imported into Chrome's Performance Flamegraph or https://ui.perfetto.dev/ for viewing.

image

This is especially helpful for situations like:

image

Despite the screenshot not succeeding, the trace of the last attempt will still be written, and we can plainly see that this particular screenshot continues work forever, never giving the metrics a chance to stabilise:

image

@Quramy Quramy merged commit b0465be into reg-viz:master Jul 25, 2023
@Quramy
Copy link
Member

Quramy commented Jul 25, 2023

thx!

@Mike-Dax Mike-Dax deleted the tracing branch July 25, 2023 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants