pub struct Performance { /* private fields */ }
Expand description
The Performance struct groups all the PerformanceMark and PerformancePeriod objects created with the event methods.
Implementations§
Source§impl Performance
impl Performance
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new Performance object.
Sourcepub fn mark<T: Into<String>>(&mut self, label: T)
pub fn mark<T: Into<String>>(&mut self, label: T)
Create a new PerformanceMark indicating a point in time.
Sourcepub fn start<T: Into<String>>(&mut self, label: T)
pub fn start<T: Into<String>>(&mut self, label: T)
Mark the start of a new PerformancePeriod.
Sourcepub fn end(&mut self, label: &str) -> Result<(), Error>
pub fn end(&mut self, label: &str) -> Result<(), Error>
Mark the end of an existing PerformancePeriod.
Sourcepub const fn periods(&self) -> &HashMap<String, PerformancePeriod>
pub const fn periods(&self) -> &HashMap<String, PerformancePeriod>
Get the map of PerformancePeriods and their labels.
Sourcepub const fn events(&self) -> &Vec<PerformanceMark>
pub const fn events(&self) -> &Vec<PerformanceMark>
Get the list of PerformanceMarks.
Trait Implementations§
Source§impl Debug for Performance
impl Debug for Performance
Source§impl Default for Performance
impl Default for Performance
Source§fn default() -> Performance
fn default() -> Performance
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Performance
impl RefUnwindSafe for Performance
impl Send for Performance
impl Sync for Performance
impl Unpin for Performance
impl UnwindSafe for Performance
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