Merge branch 'main' into t3/sccache-dash-server
This commit is contained in:
commit
a83ae5e0d9
1 file changed
+30
@@ -39,6 +39,10 @@ pub struct View {
|
||||
pub previous: Option<Totals>,
|
||||
pub timing: Timing,
|
||||
pub time_saved: TimeSaved,
|
||||
/// What is known about how long each language takes to build, from saved
|
||||
/// history. Sorted by compiles seen, largest first.
|
||||
#[serde(default)]
|
||||
pub build_times: Vec<BuildTimes>,
|
||||
/// Sorted by hits + misses, largest first.
|
||||
pub languages: Vec<Language>,
|
||||
/// Why compiles were not cacheable, largest first, e.g. ("crate-type", 562).
|
||||
@@ -131,11 +135,37 @@ pub struct Timing {
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct TimeSaved {
|
||||
pub seconds: f64,
|
||||
/// The range the true saving falls in with 90% confidence (low, high), from
|
||||
/// resampling the build times seen. `None` when there is too little data.
|
||||
#[serde(default)]
|
||||
pub interval_90: Option<(f64, f64)>,
|
||||
pub hits_left_out: u64,
|
||||
/// Plain-language account of how the figure was reached, for the hover note.
|
||||
pub note: String,
|
||||
}
|
||||
|
||||
/// The spread of build times seen for one language. sccache reports only running
|
||||
/// totals, so each data point is the average over the builds that finished
|
||||
/// between two readings ten seconds apart: often one build, sometimes a few.
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct BuildTimes {
|
||||
pub language: String,
|
||||
/// Builds seen.
|
||||
pub compiles: u64,
|
||||
pub mean_ms: f64,
|
||||
pub median_ms: f64,
|
||||
pub p90_ms: f64,
|
||||
/// Histogram, shortest first, bin edges evenly spaced on a log scale.
|
||||
pub bins: Vec<Bin>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Bin {
|
||||
pub from_ms: f64,
|
||||
pub to_ms: f64,
|
||||
pub compiles: u64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Language {
|
||||
pub name: String,
|
||||
|
||||
Reference in new issue
Block a user