Struct mmtk::util::statistics::counter::size_counter::SizeCounter
source · pub struct SizeCounter {
units: Arc<Mutex<EventCounter>>,
volume: Arc<Mutex<EventCounter>>,
}
Fields§
§units: Arc<Mutex<EventCounter>>
§volume: Arc<Mutex<EventCounter>>
Implementations§
source§impl SizeCounter
impl SizeCounter
This file implements a simple counter of events of different sizes (eg object allocations, where total number of objects and total volume of objects would be counted).
The counter is trivially composed from two event counters (one for counting the number of events, the other for counting the volume).
pub fn new( units: Arc<Mutex<EventCounter>>, volume: Arc<Mutex<EventCounter>> ) -> Self
sourcepub fn print_current_units(&self)
pub fn print_current_units(&self)
Print current (mid-phase) units
sourcepub fn print_current_volume(&self)
pub fn print_current_volume(&self)
Print (mid-phase) volume
sourcepub fn print_units(&self)
pub fn print_units(&self)
Print units
sourcepub fn print_volume(&self)
pub fn print_volume(&self)
Print volume
Auto Trait Implementations§
impl RefUnwindSafe for SizeCounter
impl Send for SizeCounter
impl Sync for SizeCounter
impl Unpin for SizeCounter
impl UnwindSafe for SizeCounter
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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>
Converts
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>
Converts
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