Metrics

Struct Metrics 

Source
pub struct Metrics {
Show 13 fields pub major_collections: AtomicU64, pub minor_collections: AtomicU64, pub major_collect_avg_time: AtomicU64, pub minor_collect_avg_time: AtomicU64, pub max_old_objects: AtomicU64, pub old_objects_count: AtomicU64, pub arena_size: AtomicU64, pub prev_arena_size: AtomicU64, pub state: AtomicU8, pub max_yield_time: AtomicU64, pub avg_yield_time: AtomicU64, pub max_arena_size: AtomicU64, pub monitor_is_on: bool,
}
Expand description

A ‘snapshot’ of the metrics relevant to the GC’s internal triggers.

Obtained by calling crate::Arena::metrics.

Fields§

§major_collections: AtomicU64

Number of major collections that have occured.

§minor_collections: AtomicU64

Number of minor collections that have occured.

§major_collect_avg_time: AtomicU64

Average time that takes for a major collection to complete.

§minor_collect_avg_time: AtomicU64

Average time that takes for a minor collection to complete.

§max_old_objects: AtomicU64

Once the old objects count reaches this number, a major collection will be triggered

§old_objects_count: AtomicU64

Running total of object that have been traced since the last major collection and all succeeding minor collections.

§arena_size: AtomicU64

Total amount of memory allocated by the arena.

§prev_arena_size: AtomicU64

The arena size at the start of the last collection.

§state: AtomicU8

The current state of the GC.

§max_yield_time: AtomicU64§avg_yield_time: AtomicU64§max_arena_size: AtomicU64§monitor_is_on: bool

Implementations§

Trait Implementations§

Source§

impl Debug for Metrics

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Is for T
where T: ?Sized,

Source§

type EqTo = T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.