pub struct MemoryMeasure<Alloc: GlobalAlloc + 'static> {
pub memory: MemStats,
/* private fields */
}
Expand description
MemoryMeasure measures the memory allocated by a benchmark.
It takes a reference to a CountingAllocator and measures the memory allocated by it.
Fields§
§memory: MemStats
Memory allocations per repetition.
Implementations§
Source§impl<Alloc: GlobalAlloc> MemoryMeasure<Alloc>
impl<Alloc: GlobalAlloc> MemoryMeasure<Alloc>
Sourcepub fn new(alloc: &'static CountingAllocator<Alloc>) -> Self
pub fn new(alloc: &'static CountingAllocator<Alloc>) -> Self
Creates a new MemoryMeasure.
Trait Implementations§
Source§impl<Alloc: GlobalAlloc> Display for MemoryMeasure<Alloc>
impl<Alloc: GlobalAlloc> Display for MemoryMeasure<Alloc>
Source§impl<Alloc: GlobalAlloc, P: Params> Measure<P> for MemoryMeasure<Alloc>
impl<Alloc: GlobalAlloc, P: Params> Measure<P> for MemoryMeasure<Alloc>
Auto Trait Implementations§
impl<Alloc> !Freeze for MemoryMeasure<Alloc>
impl<Alloc> RefUnwindSafe for MemoryMeasure<Alloc>where
Alloc: RefUnwindSafe,
impl<Alloc> Send for MemoryMeasure<Alloc>where
Alloc: Sync,
impl<Alloc> Sync for MemoryMeasure<Alloc>where
Alloc: Sync,
impl<Alloc> Unpin for MemoryMeasure<Alloc>
impl<Alloc> UnwindSafe for MemoryMeasure<Alloc>where
Alloc: RefUnwindSafe,
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