-
Notifications
You must be signed in to change notification settings - Fork 148
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 benchmarks for rustdoc #675
Conversation
I already noticed that this is doing a lot more work than expected. I thought since rustdoc doesn't check item-bodies it would be faster than The stats also show that rustdoc isn't helped at all by incremental. Not sure if this is an issue with the benchmark or with rustdoc itself. |
The CI failure looks unrelated to this change, maybe a regression in nightly? |
Getting |
Heh, turns out CI here is failing due to an upstream soundness fix, though not one that affected us (relevant code was a panic! function anyway). Fixed in 72d38b6, and closing/reopening to hopefully re-trigger CI. I'll take a look at your questions here in a bit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some initial comments on the implementation, will take a look at that panic you're getting probably tomorrow
Still not sure how to get |
You mean on the graph pages? That's just not possible since we don't have an ordering between them. I guess we could plausibly record the time they were benchmarked -- but that seems like something for a future PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty much happy with this, two more nits
I guess this doesn't touch the UI at all - in particular, the primary graphs page still has 3 columns. But I think it makes sense for now to keep it that way. We might want to show rustdoc performance on the dashboard, but that can wait several release cycles (until we have a beta and such that also has that data). |
I meant on any page, including the compare page. Strangely it seems to be working now, maybe I had a typo in the ID before (??) The stats are all over the place though, I'm not sure what's wrong but I can't believe there was an 80% increase in instructions from a PR that only touched rustc_resolve. |
That looks like you're comparing an official run -- from perf.rust-lang.org's collection server -- to a local run. That won't work well -- the official run, amongst other things, is built with a more optimally configured rustc than is typical for local building. In particular, it has LLVM ThinLTO enabled, and no debug assertions etc. |
Okay, having done some more thinking here, I think that before we merge this in I'd like to do some work to move the initial build outside of each build kind, to cache build dependencies between check/debug/opt/doc builds. For some crates that do codegen etc through build.rs that could be significant. #678 should implement that; I plan to merge it once CI is passing. It would be great if you could also rebase this on master once that PR merges and add doc builds to CI -- should be fairly easy, adjusting this line:
|
I'm running |
It's been stuck on |
Hm, that's odd. |
Ok, the error is
So I just have some debug logging gone rogue, oops. The real bug is that it will retry infinitely many times. |
And a secondary error: Since I used hard links and not symbolic links, |
Removing the logging did not fix the issue. I think |
My guess is that we're not picking up the rustdoc run as special perhaps, and not dumping perf stat output as such? |
When I run rustdoc-fake without the collector things work fine:
I'm not sure what's going on. |
Ok, we're telling cargo to pass
|
Ugh, I can't replicate at all without going through collector. I'm out of ideas. |
This is a bug in cargo. |
I ran
|
To start the site I just run |
The cargo fix landed but hasn't been distributed on nightly yet. So this should be good to go when that happens sometime tomorrow. |
@jyn514 does rustc-perf use nightly cargo or the cargo in each master release? |
@Manishearth nightly (AFAIK) |
- Distinguish between rustdoc and rustc - Use `rustdoc` instead of `doc` subcommand This only profiles the last crate and also avoids special casing RUSTDOCFLAGS. - Add a fake rustdoc - Create symlink automatically if it doesn't already exist
- Add 'Doc' to CLI help - Make Doc a default BuildKind when --builds is not passed
- Don't panic if looking at two local builds in the dashboard - Don't panic if there are no pstat results available
- Change `subcommand()` to take BuildKind and return Option - Remove `is_build_kind_supported`
This ensures that the doc build will succeed when run later, since rustdoc and rustc are known to have different ICEs.
This avoids rustdoc-fake getting out of date when rustc-fake is updated.
Same error as on #680 (comment). |
Okay, that should have triggered CI to run again which should be fixed now. I'll hopefully be merging this soon after that passes (if I haven't feel free to ping me). |
@jyn514 Actually, could we revert the coercions change from binary to library now that the Cargo patch has landed? I'd prefer to not land that together with this since it could affect perf in theory. |
Oops, good catch. Should be reverted now. |
@Mark-Simulacrum mind looking at this when you get a chance? I'd love to land this before merging rust-lang/rust#73566 so we have something to compare that to. |
This runs rustdoc by default and requires that you set rustdoc for every perf run. This is probably not the desired behavior, I can change it once everything is working.
Closes #673
Status: Waiting on review
Example usage:
I got it to show up on the site for
bench_commit
but not forbench_local
. I'm not sure where in the code to look. Suggestions welcome.The way this works is by having
rustc-fake
also pretend to be rustdoc if called asrustdoc-fake
. Additionally there is some hacking around to make the subcommandrustdoc
instead ofrustc
since currently the subcommand can only be set by aProfiler
, not by aBuildKind
.r? @Mark-Simulacrum