#[non_exhaustive]pub struct TimingReport {Show 14 fields
pub units: Vec<TimingUnit>,
pub fresh_units: usize,
pub dirty_units: usize,
pub total_units: usize,
pub jobs: Option<u32>,
pub cpus: Option<u32>,
pub max_concurrency: Option<u32>,
pub profile: Option<String>,
pub rustc_version: Option<String>,
pub host: Option<String>,
pub target: Option<String>,
pub reported_total: Option<Millis>,
pub targets: Option<String>,
pub build_start: Option<String>,
}Expand description
Everything one timing report described.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.units: Vec<TimingUnit>Every unit, in the order the report listed them, which is start order.
fresh_units: usizeUnits the build reused from the cache. The analysis requires this to be zero.
dirty_units: usizeUnits the build actually compiled.
total_units: usizeUnits in the build.
jobs: Option<u32>The -j the build ran with, from Max concurrency: N (jobs=J ncpu=C).
cpus: Option<u32>The machine’s processor count, from the same row.
max_concurrency: Option<u32>The peak number of units Cargo actually had in flight. This can exceed jobs, because a
build-script execution is not a compiler process and takes no compile token.
profile: Option<String>The profile the build used.
rustc_version: Option<String>The rustc version, as the report’s header states it.
host: Option<String>The host triple.
target: Option<String>The target triple.
reported_total: Option<Millis>Cargo’s own total for the build, which includes everything outside the unit model.
targets: Option<String>The targets the build was asked for, as one display string.
build_start: Option<String>When the build started, as an RFC 3339 timestamp, exactly as the report wrote it.
Implementations§
Source§impl TimingReport
impl TimingReport
Sourcepub fn compilation_span(&self) -> Millis
pub fn compilation_span(&self) -> Millis
The last unit’s end minus the first unit’s start: the part of the build that compiled things.
Predictions are compared against this rather than against Cargo’s reported total, because a registry update or a crate download sits on the same clock and is not work any graph transformation can shorten.
Sourcepub fn excluded_prefix(&self) -> Millis
pub fn excluded_prefix(&self) -> Millis
Cargo’s reported total minus the compilation span: fetching, resolution, and anything else outside the unit model.
Reported separately rather than folded in. A build that spent 28 s downloading and 4.7 s compiling is not a 32.5 s compilation problem.