Struct webrender::profiler::TransactionProfile
source · pub struct TransactionProfile {
pub events: Vec<Event>,
}
Expand description
A container for profiling information that moves along the rendering pipeline and is handed off to the profiler at the end.
Fields§
§events: Vec<Event>
Implementations§
source§impl TransactionProfile
impl TransactionProfile
pub fn new() -> Self
pub fn start_time(&mut self, id: usize)
pub fn end_time(&mut self, id: usize) -> f64
sourcepub fn end_time_if_started(&mut self, id: usize) -> Option<f64>
pub fn end_time_if_started(&mut self, id: usize) -> Option<f64>
Similar to end_time, but doesn’t panic if not matched with start_time.
pub fn set<T>(&mut self, id: usize, value: T)where
T: EventValue,
pub fn set_f64(&mut self, id: usize, value: f64)
pub fn get(&self, id: usize) -> Option<f64>
pub fn get_or(&self, id: usize, or: f64) -> f64
pub fn add<T>(&mut self, id: usize, n: T)where
T: EventValue,
pub fn inc(&mut self, id: usize)
pub fn take(&mut self) -> Self
pub fn take_and_reset(&mut self) -> Self
pub fn merge(&mut self, other: &mut Self)
pub fn clear(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TransactionProfile
impl RefUnwindSafe for TransactionProfile
impl Send for TransactionProfile
impl Sync for TransactionProfile
impl Unpin for TransactionProfile
impl UnwindSafe for TransactionProfile
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> 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>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 more