pub struct PerformanceReport {
pub total_measurements: usize,
pub operation_count: usize,
pub operation_statistics: HashMap<String, OperationStatistics>,
pub memory_analyses: Vec<MemoryAnalysis>,
pub generated_at: SystemTime,
pub metadata: HashMap<String, String>,
}
Expand description
Comprehensive performance report containing aggregated statistics
This struct provides a complete overview of performance across all operations, including summaries, comparisons, and analysis capabilities.
Fields§
§total_measurements: usize
Total number of measurements across all operations
operation_count: usize
Number of unique operations measured
operation_statistics: HashMap<String, OperationStatistics>
Statistics for each operation
memory_analyses: Vec<MemoryAnalysis>
Overall memory analysis results
generated_at: SystemTime
Report generation timestamp
metadata: HashMap<String, String>
Additional report metadata
Implementations§
Source§impl PerformanceReport
impl PerformanceReport
Sourcepub fn add_measurements(&mut self, measurements: &[PerformanceMeasurement])
pub fn add_measurements(&mut self, measurements: &[PerformanceMeasurement])
Add measurements to the report
Sourcepub fn add_measurement(&mut self, measurement: &PerformanceMeasurement)
pub fn add_measurement(&mut self, measurement: &PerformanceMeasurement)
Add a single measurement to the report
Sourcepub fn add_memory_analysis(&mut self, analysis: MemoryAnalysis)
pub fn add_memory_analysis(&mut self, analysis: MemoryAnalysis)
Add memory analysis to the report
Sourcepub fn find_fastest_operation(
&self,
operation_pattern: &str,
) -> Option<&OperationStatistics>
pub fn find_fastest_operation( &self, operation_pattern: &str, ) -> Option<&OperationStatistics>
Find the fastest operation matching a pattern
Sourcepub fn find_memory_efficient_operation(
&self,
operation_pattern: &str,
) -> Option<&OperationStatistics>
pub fn find_memory_efficient_operation( &self, operation_pattern: &str, ) -> Option<&OperationStatistics>
Find the most memory-efficient operation matching a pattern
Sourcepub fn top_operations_by_throughput(
&self,
n: usize,
) -> Vec<&OperationStatistics>
pub fn top_operations_by_throughput( &self, n: usize, ) -> Vec<&OperationStatistics>
Get top N operations by throughput (operations per second)
Sourcepub fn inconsistent_operations(&self) -> Vec<&OperationStatistics>
pub fn inconsistent_operations(&self) -> Vec<&OperationStatistics>
Get operations with inconsistent performance
Sourcepub fn performance_summary(&self) -> PerformanceSummary
pub fn performance_summary(&self) -> PerformanceSummary
Get overall performance summary
Sourcepub fn add_metadata(&mut self, key: String, value: String)
pub fn add_metadata(&mut self, key: String, value: String)
Add metadata to the report
Sourcepub fn get_recommendations(&self) -> Vec<String>
pub fn get_recommendations(&self) -> Vec<String>
Get recommendations based on performance analysis
Trait Implementations§
Source§impl Clone for PerformanceReport
impl Clone for PerformanceReport
Source§fn clone(&self) -> PerformanceReport
fn clone(&self) -> PerformanceReport
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for PerformanceReport
impl Debug for PerformanceReport
Source§impl Default for PerformanceReport
impl Default for PerformanceReport
Auto Trait Implementations§
impl Freeze for PerformanceReport
impl RefUnwindSafe for PerformanceReport
impl Send for PerformanceReport
impl Sync for PerformanceReport
impl Unpin for PerformanceReport
impl UnwindSafe for PerformanceReport
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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