Struct metrics::PaintTimeMetrics
source · pub struct PaintTimeMetrics {
pub(crate) pending_metrics: RefCell<HashMap<Epoch, (Option<TimerMetadata>, bool)>>,
pub(crate) navigation_start: u64,
pub(crate) first_paint: Cell<Option<u64>>,
pub(crate) first_contentful_paint: Cell<Option<u64>>,
pub(crate) pipeline_id: PipelineId,
pub(crate) time_profiler_chan: ProfilerChan,
pub(crate) constellation_chan: IpcSender<LayoutMsg>,
pub(crate) script_chan: IpcSender<ConstellationControlMsg>,
pub(crate) url: ServoUrl,
}
Fields§
§pending_metrics: RefCell<HashMap<Epoch, (Option<TimerMetadata>, bool)>>
§first_paint: Cell<Option<u64>>
§first_contentful_paint: Cell<Option<u64>>
§pipeline_id: PipelineId
§time_profiler_chan: ProfilerChan
§constellation_chan: IpcSender<LayoutMsg>
§script_chan: IpcSender<ConstellationControlMsg>
§url: ServoUrl
Implementations§
source§impl PaintTimeMetrics
impl PaintTimeMetrics
pub fn new( pipeline_id: PipelineId, time_profiler_chan: ProfilerChan, constellation_chan: IpcSender<LayoutMsg>, script_chan: IpcSender<ConstellationControlMsg>, url: ServoUrl, navigation_start: u64 ) -> PaintTimeMetrics
pub fn maybe_set_first_paint<T>(&self, profiler_metadata_factory: &T)where T: ProfilerMetadataFactory,
pub fn maybe_observe_paint_time<T>( &self, profiler_metadata_factory: &T, epoch: Epoch, display_list_is_contentful: bool )where T: ProfilerMetadataFactory,
pub fn maybe_set_metric(&self, epoch: Epoch, paint_time: u64)
pub fn get_first_paint(&self) -> Option<u64>
pub fn get_first_contentful_paint(&self) -> Option<u64>
Trait Implementations§
source§impl ProgressiveWebMetric for PaintTimeMetrics
impl ProgressiveWebMetric for PaintTimeMetrics
fn send_queued_constellation_msg( &self, name: ProgressiveWebMetricType, time: u64 )
fn get_time_profiler_chan(&self) -> &ProfilerChan
fn get_url(&self) -> &ServoUrl
Auto Trait Implementations§
impl !RefUnwindSafe for PaintTimeMetrics
impl Send for PaintTimeMetrics
impl !Sync for PaintTimeMetrics
impl Unpin for PaintTimeMetrics
impl !UnwindSafe for PaintTimeMetrics
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where
F: FnOnce(&Self) -> bool,
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where F: FnOnce(&Self) -> bool,
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> MaybeBoxed<Box<T, Global>> for T
impl<T> MaybeBoxed<Box<T, Global>> for T
source§fn maybe_boxed(self) -> Box<T, Global>
fn maybe_boxed(self) -> Box<T, Global>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert