pub struct ThroughputAnalyzer {
pub data_size: u64,
pub item_count: Option<u64>,
pub operation: String,
}Expand description
Throughput measurement and calculation utilities
Fields§
§data_size: u64Data size being processed (in bytes)
item_count: Option<u64>Number of items being processed
operation: StringOperation description
Implementations§
Source§impl ThroughputAnalyzer
impl ThroughputAnalyzer
Sourcepub fn new(operation: impl Into<String>, data_size: u64) -> Self
pub fn new(operation: impl Into<String>, data_size: u64) -> Self
Create a new throughput analyzer
Sourcepub fn with_items(self, item_count: u64) -> Self
pub fn with_items(self, item_count: u64) -> Self
Set the number of items processed
Sourcepub fn analyze(&self, result: &BenchmarkResult) -> ThroughputMetrics
pub fn analyze(&self, result: &BenchmarkResult) -> ThroughputMetrics
Calculate throughput metrics from benchmark result
Sourcepub fn compare_throughput(
&self,
results: &HashMap<String, BenchmarkResult>,
) -> ThroughputComparison
pub fn compare_throughput( &self, results: &HashMap<String, BenchmarkResult>, ) -> ThroughputComparison
Analyze multiple benchmark results and compare throughput
Trait Implementations§
Source§impl Clone for ThroughputAnalyzer
impl Clone for ThroughputAnalyzer
Source§fn clone(&self) -> ThroughputAnalyzer
fn clone(&self) -> ThroughputAnalyzer
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 ThroughputAnalyzer
impl RefUnwindSafe for ThroughputAnalyzer
impl Send for ThroughputAnalyzer
impl Sync for ThroughputAnalyzer
impl Unpin for ThroughputAnalyzer
impl UnwindSafe for ThroughputAnalyzer
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