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

Provide a link to the documentation in the timing report #10487

Closed
ehuss opened this issue Mar 19, 2022 · 1 comment · Fixed by #10492
Closed

Provide a link to the documentation in the timing report #10487

ehuss opened this issue Mar 19, 2022 · 1 comment · Fixed by #10492
Assignees
Labels
A-timings Area: timings C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@ehuss
Copy link
Contributor

ehuss commented Mar 19, 2022

Problem

A user may discover the --timings flag without reading the cargo documentation. Although most of the user experience should be relatively easy to grasp, there are some details that are obscure or not clear. A user may hit a wall where it is not clear where to go. For example:

  1. User runs with --timings
  2. Cargo prints where the timing report is saved. Hopefully the user knows how to open an HTML file.
  3. User skims the report. Most of the sections are self-explanatory, but some are not. Confusion sets in.
  4. User may grasp most of it, but not know how to take advantage of this information to improve build times.

Proposed Solution

I think a simple solution would be to provide a link to the documentation at https://doc.rust-lang.org/nightly/cargo/reference/timings.html. I have two proposed sites, though I'm not sure if one or both or neither are good places:

  • At the bottom of the report, as a simple text link, like Timing Documentation
  • In the graph legend (the labels for Waiting/Inactive/Active/CPU). Without reading the documentation, I would not expect anyone to understand what they mean, which is not a good user experience. Two suggestions:
    • Add a ? which when clicked opens the documentation.
    • Have a mouse hover tooltip which briefly explains each label.

Note that making things clickable in the canvas might be a little challenging. Hopefully it can be done with a minimal amount of code.

Notes

No response

@ehuss ehuss added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` A-timings Area: timings labels Mar 19, 2022
@Rustin170506
Copy link
Member

@rustbot claim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-timings Area: timings C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants