Struct Statistics

Source
pub struct Statistics {
Show 26 fields pub record_count: AtomicU32, pub memory_usage: AtomicUsize, pub disk_usage: AtomicU64, pub total_gets: AtomicU64, pub total_inserts: AtomicU64, pub total_updates: AtomicU64, pub total_deletes: AtomicU64, pub total_range_queries: AtomicU64, pub get_latency_ns: AtomicU64, pub insert_latency_ns: AtomicU64, pub delete_latency_ns: AtomicU64, pub cache_hits: AtomicU64, pub cache_misses: AtomicU64, pub cache_evictions: AtomicU64, pub cache_memory: AtomicUsize, pub writes_buffered: AtomicU64, pub writes_flushed: AtomicU64, pub write_failures: AtomicU64, pub flush_count: AtomicU64, pub disk_reads: AtomicU64, pub disk_writes: AtomicU64, pub disk_bytes_read: AtomicU64, pub disk_bytes_written: AtomicU64, pub key_not_found_errors: AtomicU64, pub out_of_memory_errors: AtomicU64, pub io_errors: AtomicU64,
}
Expand description

Central statistics hub for FeoxStore

Fields§

§record_count: AtomicU32§memory_usage: AtomicUsize§disk_usage: AtomicU64§total_gets: AtomicU64§total_inserts: AtomicU64§total_updates: AtomicU64§total_deletes: AtomicU64§total_range_queries: AtomicU64§get_latency_ns: AtomicU64§insert_latency_ns: AtomicU64§delete_latency_ns: AtomicU64§cache_hits: AtomicU64§cache_misses: AtomicU64§cache_evictions: AtomicU64§cache_memory: AtomicUsize§writes_buffered: AtomicU64§writes_flushed: AtomicU64§write_failures: AtomicU64§flush_count: AtomicU64§disk_reads: AtomicU64§disk_writes: AtomicU64§disk_bytes_read: AtomicU64§disk_bytes_written: AtomicU64§key_not_found_errors: AtomicU64§out_of_memory_errors: AtomicU64§io_errors: AtomicU64

Implementations§

Source§

impl Statistics

Source

pub fn new() -> Self

Source

pub fn record_get(&self, latency_ns: u64, hit: bool)

Record a get operation

Source

pub fn record_insert(&self, latency_ns: u64, is_update: bool)

Record an insert operation

Source

pub fn record_delete(&self, latency_ns: u64)

Record a delete operation

Source

pub fn record_range_query(&self)

Record a range query

Source

pub fn record_eviction(&self, count: u64)

Record cache eviction

Source

pub fn record_write_buffered(&self)

Record write buffer operation

Source

pub fn record_write_flushed(&self, count: u64)

Source

pub fn record_write_failed(&self)

Source

pub fn record_disk_read(&self, bytes: u64)

Record disk I/O

Source

pub fn record_disk_write(&self, bytes: u64)

Source

pub fn record_error(&self, error: &FeoxError)

Record errors

Source

pub fn snapshot(&self) -> StatsSnapshot

Get a snapshot of current statistics

Source

pub fn reset(&self)

Reset all statistics

Trait Implementations§

Source§

impl Debug for Statistics

Source§

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

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

impl Default for Statistics

Source§

fn default() -> Self

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.

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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.
§

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

§

fn vzip(self) -> V