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
Make timings graphs scalable to user's window (#15766)
### What does this PR try to resolve?
This PR changes the way the charts produced by `cargo build --timings`
scale. It changes the scale slider so that its min/max values adapt to
the duration of the build, to allow zooming in/out even for very short
build durations. It also automatically initializes the scale value based
on the client's window width.
The number of pixels per second per scale value has been changed from 1
to 8, to avoid having too many scale values for the given duration of
supported chart widths, which I have determined in this PR to be `[200,
4096]` pixels.
https://github.com/user-attachments/assets/3e6e9f14-eabe-425a-a568-9fcb5c835145
### How to test and review this PR?
Run `cargo build --timings` e.g. on
https://github.com/BurntSushi/ripgrep. Then open the resulting page in a
browser, and try to enlarge/ensmall the window (possibly using mobile
emulation), and see how the charts react to window size.
Fixes: #15666
0 commit comments