Struct style::context::TraversalStatistics [] [src]

pub struct TraversalStatistics {
    pub elements_traversed: u32,
    pub elements_styled: u32,
    pub elements_matched: u32,
    pub styles_shared: u32,
    pub styles_reused: u32,
    pub selectors: u32,
    pub revalidation_selectors: u32,
    pub dependency_selectors: u32,
    pub declarations: u32,
    pub stylist_rebuilds: u32,
    pub traversal_time_ms: f64,
    pub is_parallel: Option<bool>,
    pub is_large: Option<bool>,
}

Statistics gathered during the traversal. We gather statistics on each thread and then combine them after the threads join via the Add implementation below.

Fields

The total number of elements traversed.

The number of elements where has_styles() went from false to true.

The number of elements for which we performed selector matching.

The number of cache hits from the StyleSharingCache.

The number of styles reused via rule node comparison from the StyleSharingCache.

The number of selectors in the stylist.

The number of revalidation selectors.

The number of state/attr dependencies in the dependency set.

The number of declarations in the stylist.

The number of times the stylist was rebuilt.

Time spent in the traversal, in milliseconds.

Whether this was a parallel traversal.

Whether this is a "large" traversal.

Methods

impl TraversalStatistics
[src]

[src]

Computes the traversal time given the start time in seconds.

[src]

Returns whether this traversal is 'large' in order to avoid console spam from lots of tiny traversals.

Trait Implementations

impl Default for TraversalStatistics
[src]

[src]

Returns the "default value" for a type. Read more

impl<'a> Add for &'a TraversalStatistics
[src]

Implementation of Add to aggregate statistics across different threads.

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Display for TraversalStatistics
[src]

Format the statistics in a way that the performance test harness understands. See https://bugzilla.mozilla.org/show_bug.cgi?id=1331856#c2

[src]

Formats the value using the given formatter. Read more