Struct marble::Stats

source ·
pub struct Stats {
Show 15 fields pub live_objects: u64, pub stored_objects: u64, pub dead_objects: u64, pub live_ratio: f32, pub files: usize, pub total_file_size: u64, pub compressed_bytes_written: u64, pub compressed_bytes_read: u64, pub decompressed_bytes_written: u64, pub decompressed_bytes_read: u64, pub high_level_user_bytes_written: u64, pub read_compression_ratio: f32, pub written_compression_ratio: f32, pub write_amplification: f32, pub space_amplification: f32,
}
Expand description

Statistics for file contents, to base decisions around calls to maintenance.

Fields§

§live_objects: u64

The number of live objects stored in the backing storage files.

§stored_objects: u64

The total number of (potentially duplicated) objects stored in the backing storage files.

§dead_objects: u64

The number of dead objects that have been replaced or removed in other storage files, contributing to fragmentation.

§live_ratio: f32

The ratio of all objects on disk that are live to all objects in total. This is another way of expressing fragmentation.

§files: usize

The number of backing storage files that exist and are being held open.

§total_file_size: u64

The sum of the sizes of all files currently on-disk.

§compressed_bytes_written: u64

The number of compressed bytes that have been written due to calls to both write_batch and rewrites caused by calls to maintenance since this instance of Marble was recovered.

§compressed_bytes_read: u64

The number of compressed bytes that have been read since this instance of Marble was recovered.

§decompressed_bytes_written: u64

The number of decompressed bytes that have been written due to calls to both write_batch and rewrites caused by calls to maintenance since this instance of Marble was recovered.

§decompressed_bytes_read: u64

The number of decompressed bytes that have been read since this instance of Marble was recovered.

§high_level_user_bytes_written: u64

This is the number of bytes that are written from user calls to crate::Marble::write_batch since this instance was recovered.

§read_compression_ratio: f32

Compression ratio for read objects since this Marble instance was recovered. 1.0 means no compression, 2.0 means that we saved 50% space by compressing, etc…

§written_compression_ratio: f32

Compression ratio for objects written since this Marble instance was recovered. 1.0 means no compression, 2.0 means that we saved 50% space by compressing, etc…

§write_amplification: f32

The ratio of all decompressed writes performed to high-level user data since this instance of Marble was recovered. This is basically the maintenance overhead of on-disk GC in response to objects being rewritten and defragmentation maintenance copying old data to new homes. 1.0 is “perfect”. If all data needs to be copied once, this will be 2.0, etc… For reference, many LSM tries will see write amplifications of a few dozen, and b-trees can often see write amplifications of several hundred. So, if you’re under 10 for serious workloads, you’re doing much better than most industrial systems.

§space_amplification: f32

The ratio of the sum of the size of all compressed files written to the sum of the size of all high-level user data written since this instance of Marble was recovered. This goes up with fragmentation, and is brought back down with calls to maintenance that defragment storage files. Higher compression levels also cause this to be lower.

Trait Implementations§

source§

impl Clone for Stats

source§

fn clone(&self) -> Stats

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 Stats

source§

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

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

impl Copy for Stats

Auto Trait Implementations§

§

impl RefUnwindSafe for Stats

§

impl Send for Stats

§

impl Sync for Stats

§

impl Unpin for Stats

§

impl UnwindSafe for Stats

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere 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 Twhere 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 Twhere 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.