Struct performance_mark::Performance
source · 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: AsRef<str>>(&mut self, label: T)
pub fn mark<T: AsRef<str>>(&mut self, label: T)
Create a new PerformanceMark indicating a point in time.
sourcepub fn start<T: AsRef<str>>(&mut self, label: T)
pub fn start<T: AsRef<str>>(&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 fn periods(&self) -> &HashMap<String, PerformancePeriod>
pub fn periods(&self) -> &HashMap<String, PerformancePeriod>
Get the map of PerformancePeriods and their labels.
sourcepub fn events(&self) -> &Vec<PerformanceMark>
pub 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