Skip to main content

TimingReport

Struct TimingReport 

Source
#[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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional 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: usize

Units the build reused from the cache. The analysis requires this to be zero.

§dirty_units: usize

Units the build actually compiled.

§total_units: usize

Units 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

Source

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.

Source

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.

Trait Implementations§

Source§

impl Clone for TimingReport

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TimingReport

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for TimingReport

Source§

impl PartialEq for TimingReport

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TimingReport

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.