Skip to content

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

Closed
@ehuss

Description

@ehuss

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

Metadata

Metadata

Assignees

Labels

A-timingsArea: timingsC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions