pub struct ProfileMetrics {
pub name: String,
pub total_time: Duration,
pub average_time: Duration,
pub min_time: Duration,
pub max_time: Duration,
pub count: usize,
pub memory_allocated: usize,
pub memory_freed: usize,
pub peak_memory: usize,
pub custom_metrics: HashMap<String, f64>,
}
Expand description
Performance metrics collected during profiling
Fields§
§name: String
§total_time: Duration
§average_time: Duration
§min_time: Duration
§max_time: Duration
§count: usize
§memory_allocated: usize
§memory_freed: usize
§peak_memory: usize
§custom_metrics: HashMap<String, f64>
Implementations§
Source§impl ProfileMetrics
impl ProfileMetrics
pub fn new(name: String) -> Self
pub fn record_duration(&mut self, duration: Duration)
pub fn print_summary(&self)
Trait Implementations§
Source§impl Clone for ProfileMetrics
impl Clone for ProfileMetrics
Source§fn clone(&self) -> ProfileMetrics
fn clone(&self) -> ProfileMetrics
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ProfileMetrics
impl RefUnwindSafe for ProfileMetrics
impl Send for ProfileMetrics
impl Sync for ProfileMetrics
impl Unpin for ProfileMetrics
impl UnwindSafe for ProfileMetrics
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