diff options
author | ddh <dianehosfelt@gmail.com> | 2017-11-14 15:08:32 +0000 |
---|---|---|
committer | ddh <dianehosfelt@gmail.com> | 2017-11-14 15:21:35 +0000 |
commit | 2ef28d05b58b3184773c4bcd2b41601dcb69da8e (patch) | |
tree | 2707901d2f77b49035233ef5fe854e377801e892 /components/metrics | |
parent | d287ec8d3ee5af9e64979ec77894f218cae1b46d (diff) | |
download | servo-2ef28d05b58b3184773c4bcd2b41601dcb69da8e.tar.gz servo-2ef28d05b58b3184773c4bcd2b41601dcb69da8e.zip |
added navigation start for interactive metrics
Diffstat (limited to 'components/metrics')
-rw-r--r-- | components/metrics/lib.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/components/metrics/lib.rs b/components/metrics/lib.rs index 7e7cd9afd1d..bd2d488f100 100644 --- a/components/metrics/lib.rs +++ b/components/metrics/lib.rs @@ -40,6 +40,7 @@ pub trait ProgressiveWebMetric { fn send_queued_constellation_msg(&self, name: ProgressiveWebMetricType, time: u64); } +/// TODO make this configurable /// maximum task time is 50ms (in ns) pub const MAX_TASK_NS: u64 = 50000000; /// 10 second window (in ns) @@ -84,6 +85,7 @@ fn set_metric<U: ProgressiveWebMetric>( // Print the metric to console if the print-pwm option was given. if opts::get().print_pwm { + println!("Navigation start: {}", pwm.get_navigation_start().unwrap()); println!("{:?} {:?}", metric_type, time); } @@ -216,6 +218,10 @@ impl InteractiveMetrics { pub fn get_tti(&self) -> Option<u64> { self.time_to_interactive.get() } + + pub fn needs_tti(&self) -> bool { + self.get_tti().is_none() + } } impl ProgressiveWebMetric for InteractiveMetrics { |