pub struct ResourceAccumulator { /* private fields */ }Expand description
Incrementally aggregate partial resource measurements without overflow.
Implementations§
Source§impl ResourceAccumulator
impl ResourceAccumulator
Sourcepub fn record(&mut self, sample: ResourceSample)
pub fn record(&mut self, sample: ResourceSample)
Record the fields present for one benchmark iteration.
Sourcepub fn finish(self) -> ResourceAggregate
pub fn finish(self) -> ResourceAggregate
Finish aggregation, consuming the accumulator.
Trait Implementations§
Source§impl Debug for ResourceAccumulator
impl Debug for ResourceAccumulator
Auto Trait Implementations§
impl Freeze for ResourceAccumulator
impl RefUnwindSafe for ResourceAccumulator
impl Send for ResourceAccumulator
impl Sync for ResourceAccumulator
impl Unpin for ResourceAccumulator
impl UnsafeUnpin for ResourceAccumulator
impl UnwindSafe for ResourceAccumulator
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