Dashboard page: fit the page, five shares, build-time histograms

- Built is the miss count, as sccache counts timeouts, cache errors and
  forced recaches inside it. The bar under the headline has five shares
  that add up to every compiler call and always to 100%; what happened
  inside the built share is one line under the bar.
- The time saved shows its 90% range in small print under the figure.
- Speed gains "How long builds take, by language": one fixed-height
  histogram per language on a shared log scale of build time, with the
  mean, median and p90 marked.
- The api crate's Range helpers replace the page's own copies.
- Drawing is built only for the browser, so the tests (and the rest of
  the crate) build anywhere without eframe's native backends.
- Tables are drawn row by row; egui's Grid lost its rows when a cell
  held more than a plain widget. Fold-away bodies are held to the width
  of the page, and the charts fit their data every frame.
- mise.toml takes trunk 0.22.2 as a release binary; building it from
  source took over half an hour.
This commit is contained in:
swaits committed 2026-11-28 12:10:01 -07:00
1 parent c589b7c868
commit dc876b5a5c
13 files changed
+549 -361

No files matched your search

+3 -2
View File
@@ -21,14 +21,15 @@ pub fn section(ui: &mut Ui, view: &View, dark: bool) {
Severity::Error => "Error",
Severity::Warning => "Warning",
};
let width = ui.available_width();
// As wide as there is room, minus a little (see `banner`).
let width = ui.available_rect_before_wrap().width() - 2.0 * 8.0;
egui::Frame::NONE
.fill(color.gamma_multiply(0.14))
.stroke(Stroke::new(1.0, color))
.corner_radius(6.0)
.inner_margin(8.0)
.show(ui, |ui| {
ui.set_width(width - 16.0);
ui.set_min_width(width - 6.0);
ui.horizontal_wrapped(|ui| {
ui.label(RichText::new(kind).small().strong().color(color));
ui.label(RichText::new(&problem.title).strong());