pub struct StatisticsCollector { /* private fields */ }Expand description
Utility for collecting and aggregating performance statistics
Implementations§
Source§impl StatisticsCollector
impl StatisticsCollector
Sourcepub fn add_measurement(&mut self, measurement: PerformanceMeasurement)
pub fn add_measurement(&mut self, measurement: PerformanceMeasurement)
Add a measurement to the collection
Sourcepub fn add_measurements(&mut self, measurements: Vec<PerformanceMeasurement>)
pub fn add_measurements(&mut self, measurements: Vec<PerformanceMeasurement>)
Add multiple measurements
Sourcepub fn add_memory_analysis(&mut self, analysis: MemoryAnalysis)
pub fn add_memory_analysis(&mut self, analysis: MemoryAnalysis)
Add a memory analysis
Sourcepub fn add_metadata(&mut self, key: String, value: String)
pub fn add_metadata(&mut self, key: String, value: String)
Add metadata
Sourcepub fn generate_report(&self) -> PerformanceReport
pub fn generate_report(&self) -> PerformanceReport
Generate a comprehensive performance report
Sourcepub fn measurement_count(&self) -> usize
pub fn measurement_count(&self) -> usize
Get number of collected measurements
Sourcepub fn get_measurements_for_operation(
&self,
operation_pattern: &str,
) -> Vec<&PerformanceMeasurement>
pub fn get_measurements_for_operation( &self, operation_pattern: &str, ) -> Vec<&PerformanceMeasurement>
Get measurements for a specific operation
Trait Implementations§
Source§impl Debug for StatisticsCollector
impl Debug for StatisticsCollector
Auto Trait Implementations§
impl Freeze for StatisticsCollector
impl RefUnwindSafe for StatisticsCollector
impl Send for StatisticsCollector
impl Sync for StatisticsCollector
impl Unpin for StatisticsCollector
impl UnsafeUnpin for StatisticsCollector
impl UnwindSafe for StatisticsCollector
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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