Skip to main content

PipelineCounters

Struct PipelineCounters 

Source
pub struct PipelineCounters {
    pub files_read: u64,
    pub source_bytes_read: u64,
    pub parse_cache_bytes_read: u64,
    pub css_masked_bytes: u64,
    pub resolve_specifier_calls: u64,
    pub unique_specifiers: u64,
    pub oxc_resolve_calls: u64,
    pub canonicalize_calls: u64,
}
Expand description

Deterministic work counts for one dead-code pipeline run.

Every count is exact for a given project, commit and cache state. It does not depend on the thread count, the machine or the load, so a regression test can compare it with exact equality where a millisecond value is too noisy. A count is zero when its stage did no work, for example the resolver counts on a run that reused the persisted module graph.

Fields§

§files_read: u64

Source files whose bytes the parse stage read from disk. A warm cache hit on file metadata reads no bytes. cache_misses counts the files that were parsed.

§source_bytes_read: u64

Bytes of source read from disk by the parse stage.

§parse_cache_bytes_read: u64

Bytes of the persisted parse cache read from disk. Zero when the run had no parse cache or used --no-cache.

§css_masked_bytes: u64

Bytes of stylesheet source that the parse stage passed through the CSS comment mask. The parse masks each stylesheet once, so this value is the size of the parsed stylesheets. A higher value shows a repeated mask. Zero when no stylesheet was parsed.

§resolve_specifier_calls: u64

Specifier resolutions that the import sites asked for: one for each static import binding, re-export, require(), import() and module mock. Internal retries inside the resolver are not counted here.

§unique_specifiers: u64

Distinct (specifier, from_style) pairs for each importing file, summed over all files. A ratio of resolve_specifier_calls to this value above 1.0 shows bindings that share a specifier. The resolver runs at most once for each of these pairs. A pair that returns before the resolver, such as an external URL, makes no resolver call.

§oxc_resolve_calls: u64

Calls into the module resolver, including fallback retries.

§canonicalize_calls: u64

Path canonicalize calls that import resolution needs: each direct call, plus one for each distinct path that goes through the canonicalize cache. Resolver setup is not counted.

Trait Implementations§

Source§

impl Clone for PipelineCounters

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 Copy for PipelineCounters

Source§

impl Debug for PipelineCounters

Source§

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

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

impl Default for PipelineCounters

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for PipelineCounters

Source§

impl PartialEq for PipelineCounters

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 Serialize for PipelineCounters

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for PipelineCounters

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<'a, T> FromIn<'a, T> for T

Source§

fn from_in(t: T, _: &'a Allocator) -> T

Converts to this type from the input type within the given allocator.
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<'a, T, U> IntoIn<'a, U> for T
where U: FromIn<'a, T>,

Source§

fn into_in(self, allocator: &'a Allocator) -> U

Converts this type into the (usually inferred) input type within the given allocator.
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.