You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #12420 - Angelin01:timings-show-version, r=weihanglo
Display crate version on timings graph
### What does this PR try to resolve?
Fixes#7384
The solution here is the simplest one: since duplicate crates with different versions can cause confusion, we always output the version.
### How should we test and review this PR?
Build any create using the `--timings` option:
```
cargo build --timings
```
and verify the resulting HTML file.
### Additional information
The formatting is consistent with how the crates are displayed in the terminal output for Cargo and also on the table below the graph. Initially, [this comment](#7384 (comment)) suggested said formatting for ease of searching, but I do believe the browser can't search in the graph itself.
Sample console output:
```
Compiling lazycell v1.3.0
Compiling unicode-xid v0.2.4
Compiling unicode-width v0.1.10
Compiling glob v0.3.1
Compiling curl-sys v0.4.65+curl-8.2.1
Compiling curl v0.4.44
Compiling git2 v0.17.2
```
Sample rendered HTML output:

### Possible issues and future work
A possible issue in this solution is that the output becomes too noisy. Other possible solutions:
- Only display the version if there are two "units" with the same name. One possible implementation is to count the names, aggregate them in a simple map and look it up during rendering.
- Create a small selection to select the disambiguate method between "Never", "Always" and "Only duplicates". This may be overkill.
0 commit comments