Skip to content

Add links to Perfetto to visualize self-profile query traces #1757

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

Merged
merged 4 commits into from
Dec 7, 2023

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented Nov 26, 2023

Replace the recently removed Speedscope link with a link to perfetto.dev, for visualizing the self-profile query traces. It also adds a quick link to these trace visualizations to the compile benchmark detail section in the compage page.

@Kobzol Kobzol requested a review from lqd November 27, 2023 23:03
Copy link
Member

@lqd lqd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I have to test this locally with a real profile run? Otherwise perfetto or the FF profiler won't be able to get to the data, it's using localhost (with CORS issues) and not the base url IIUC.

I have added such links myself to perf.rlo years ago, and with hindsight I've rarely used them. They're cute and sometimes useful, but they're also wall-time and contain self-profiling data.

I personally don't think they're used enough to show so many links in the benchmark detail panel. At the same time, I have little time to work on perf these days and if the WG thinks it's more valuable than I do, let's do it.

Therefore I'll approve the PR because apart from nits this looks good to me. But I couldn't test it using perf.rlo's endpoints, I trust you that it does.

@lqd
Copy link
Member

lqd commented Dec 6, 2023

If the size of the profiler.json file starts causing issues to read from the site and then upload to Perfetto, we could try converting measureme files to Fuchsia’s format. It’s binary and supports string refs/interning, to reduce a lot of the duplication in the Chrome profiler format. Perfetto also supports it if I understand correctly.

https://fuchsia.dev/fuchsia-src/reference/tracing/trace-format

@Kobzol
Copy link
Contributor Author

Kobzol commented Dec 7, 2023

I tried to compress the links:
image

Let's merge it and see what others say.

@Kobzol Kobzol enabled auto-merge December 7, 2023 12:36
@Kobzol Kobzol merged commit ddfd2b2 into rust-lang:master Dec 7, 2023
@Kobzol Kobzol deleted the perfetto-link branch December 7, 2023 12:59
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