mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Diagnostic map semantics.
MozReview-Commit-ID: C0a5g6xMPY0
This commit is contained in:
parent
438b9df00c
commit
f5c5be00a7
11 changed files with 296 additions and 69 deletions
|
@ -322,8 +322,6 @@ pub struct TraversalStatistics {
|
|||
pub selectors: u32,
|
||||
/// The number of revalidation selectors.
|
||||
pub revalidation_selectors: u32,
|
||||
/// The number of state/attr dependencies in the dependency set.
|
||||
pub dependency_selectors: u32,
|
||||
/// The number of declarations in the stylist.
|
||||
pub declarations: u32,
|
||||
/// The number of times the stylist was rebuilt.
|
||||
|
@ -344,7 +342,6 @@ impl<'a> ops::Add for &'a TraversalStatistics {
|
|||
"traversal_time_ms should be set at the end by the caller");
|
||||
debug_assert!(self.selectors == 0, "set at the end");
|
||||
debug_assert!(self.revalidation_selectors == 0, "set at the end");
|
||||
debug_assert!(self.dependency_selectors == 0, "set at the end");
|
||||
debug_assert!(self.declarations == 0, "set at the end");
|
||||
debug_assert!(self.stylist_rebuilds == 0, "set at the end");
|
||||
TraversalStatistics {
|
||||
|
@ -355,7 +352,6 @@ impl<'a> ops::Add for &'a TraversalStatistics {
|
|||
styles_reused: self.styles_reused + other.styles_reused,
|
||||
selectors: 0,
|
||||
revalidation_selectors: 0,
|
||||
dependency_selectors: 0,
|
||||
declarations: 0,
|
||||
stylist_rebuilds: 0,
|
||||
traversal_time_ms: 0.0,
|
||||
|
@ -383,7 +379,6 @@ impl fmt::Display for TraversalStatistics {
|
|||
writeln!(f, "[PERF],styles_reused,{}", self.styles_reused)?;
|
||||
writeln!(f, "[PERF],selectors,{}", self.selectors)?;
|
||||
writeln!(f, "[PERF],revalidation_selectors,{}", self.revalidation_selectors)?;
|
||||
writeln!(f, "[PERF],dependency_selectors,{}", self.dependency_selectors)?;
|
||||
writeln!(f, "[PERF],declarations,{}", self.declarations)?;
|
||||
writeln!(f, "[PERF],stylist_rebuilds,{}", self.stylist_rebuilds)?;
|
||||
writeln!(f, "[PERF],traversal_time_ms,{}", self.traversal_time_ms)?;
|
||||
|
@ -405,7 +400,6 @@ impl TraversalStatistics {
|
|||
self.traversal_time_ms = (time::precise_time_s() - start) * 1000.0;
|
||||
self.selectors = stylist.num_selectors() as u32;
|
||||
self.revalidation_selectors = stylist.num_revalidation_selectors() as u32;
|
||||
self.dependency_selectors = stylist.num_invalidations() as u32;
|
||||
self.declarations = stylist.num_declarations() as u32;
|
||||
self.stylist_rebuilds = stylist.num_rebuilds() as u32;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue