pub struct MemoryComparison {
pub benchmark_name: String,
pub impl1_name: String,
pub impl1_result: BenchmarkResult,
pub impl1_stats: AllocationStats,
pub impl2_name: String,
pub impl2_result: BenchmarkResult,
pub impl2_stats: AllocationStats,
}Expand description
Comparison of memory usage between two implementations
Fields§
§benchmark_name: StringName of the benchmark
impl1_name: StringFirst implementation name
impl1_result: BenchmarkResultFirst implementation benchmark results
impl1_stats: AllocationStatsFirst implementation allocation stats
impl2_name: StringSecond implementation name
impl2_result: BenchmarkResultSecond implementation benchmark results
impl2_stats: AllocationStatsSecond implementation allocation stats
Implementations§
Source§impl MemoryComparison
impl MemoryComparison
Sourcepub fn more_memory_efficient(&self) -> (&str, &AllocationStats)
pub fn more_memory_efficient(&self) -> (&str, &AllocationStats)
Get the more memory-efficient implementation
Sourcepub fn memory_reduction_percentage(&self) -> f64
pub fn memory_reduction_percentage(&self) -> f64
Calculate memory usage reduction percentage
Sourcepub fn to_markdown(&self) -> String
pub fn to_markdown(&self) -> String
Generate comprehensive memory comparison report
Trait Implementations§
Source§impl Clone for MemoryComparison
impl Clone for MemoryComparison
Source§fn clone(&self) -> MemoryComparison
fn clone(&self) -> MemoryComparison
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 MemoryComparison
impl RefUnwindSafe for MemoryComparison
impl Send for MemoryComparison
impl Sync for MemoryComparison
impl Unpin for MemoryComparison
impl UnwindSafe for MemoryComparison
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