Struct thingvellir::ShardStats

source ·
pub struct ShardStats {
Show 15 fields pub executions_complete: u64, pub executions_coalesced: u64, pub executions_pending: usize, pub keys_lru_evicted: u64, pub keys_ttl_evicted: u64, pub keys_taken: u64, pub internal_tasks: usize, pub loads_in_progress: usize, pub loads_failed: u64, pub loads_not_found: u64, pub loads_complete: u64, pub data_size: usize, pub expiring_keys: usize, pub expiration_probes_ran: u64, pub expiration_probes_expedited: u64,
}
Expand description

Stat counters for a single shard, holding various counters that may be of use to report metrics for. A convenience method is provided to sum all the counters via ShardStats::merge_stats(..).

Fields§

§executions_complete: u64

The number of executions that a given shard has completed.

§executions_coalesced: u64

The number of executions that completed as result of a coalesced load from upstream.

§executions_pending: usize

The number of executions that are currently pending data being loaded from the upstream.

§keys_lru_evicted: u64

The number of keys that have been evicted due to capacity constraints that caused an LRU key to be removed.

§keys_ttl_evicted: u64

The number of keys that have been evicted due to TTLing out.

§keys_taken: u64

The number of keys that have been removed via the .take_data() method.

§internal_tasks: usize

The number of load & commit tasks that are currently in the internal join set.

§loads_in_progress: usize

The number of load operations that are currently in progress.

§loads_failed: u64

The number of load operations that have failed (not including those that have failed due to not_found.)

§loads_not_found: u64

The number of load operations that have failed due to the upstream reporting that the key was not found.

§loads_complete: u64

The number of load operations that have completed successfully.

§data_size: usize

The number of keys that the shard is currently holding in memory.

§expiring_keys: usize

The number of keys that the shard is holding, that has an expiration.

§expiration_probes_ran: u64

The number of expiration probes that the shard has run.

§expiration_probes_expedited: u64

The number of expedited expiration probes that the shard has run.

Implementations§

source§

impl ShardStats

source

pub fn merge_stats<S: IntoIterator<Item = ShardStats>>(stats: S) -> Self

Merges a bunch of ShardStats into a singular shard stat that has all the counters summed up.

Trait Implementations§

source§

impl Clone for ShardStats

source§

fn clone(&self) -> ShardStats

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ShardStats

source§

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

Formats the value using the given formatter. Read more
source§

impl Default for ShardStats

source§

fn default() -> ShardStats

Returns the “default value” for a type. 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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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>,

§

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.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V