Make it possible to load self-profile data from local filesystem#2375
Merged
Kobzol merged 12 commits intorust-lang:masterfrom Jan 29, 2026
Merged
Make it possible to load self-profile data from local filesystem#2375Kobzol merged 12 commits intorust-lang:masterfrom
Kobzol merged 12 commits intorust-lang:masterfrom
Conversation
It seems that it hasn't been used for several years. Doesn't seem like it's used in the wild [either](https://github.com/search?type=code&q=%2Fperf%2Fself-profile-raw).
c9554c7 to
a684959
Compare
Jamesbarford
approved these changes
Jan 29, 2026
Contributor
Jamesbarford
left a comment
There was a problem hiding this comment.
This is great 😄 - LGTM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refactors the self-profile resolve mechanism in the website to use the
SelfProfileStoragetrait introduced in #2366. That makes it possible to runbench_localbenchmarks with--self-profile, and then seeing all the self-profile information in the local website. That includes the compilation sections, the detailed results page, query table diffs, flamegraphs, Crox/Firefox/Perfetto visualizations and also raw self-profile data download. Everything should now also Just Work™ locally.This was the gnarliest of the self-profile refactorings that I had to do, and it should unblock further work to include codegen backend and target in the self-profile URL, and maybe also to slightly optimize the self-profile upload during benchmark collection.
I removed one legacy endpoint for which I found no usage.
It can be tested e.g. with:
cargo run --bin collector bench_local --include helloworld --id self-profile-test-artifact1 --self-profile `rustup +nightly which rustc` --db postgres://postgres:testpass@localhost:5432/postgresand then opening the website and checking e.g. the Detailed results page.
Best reviewed commit-by-commit.