Struct MemoryStats

Source
pub struct MemoryStats {
Show 29 fields pub peak_allocated: usize, pub total_allocated: usize, pub startup_allocated: usize, pub replication_backlog: usize, pub clients_slaves: usize, pub clients_normal: usize, pub cluster_links: usize, pub aof_buffer: usize, pub lua_caches: usize, pub functions_caches: usize, pub databases: HashMap<usize, DatabaseOverhead>, pub overhead_total: usize, pub keys_count: usize, pub keys_bytes_per_key: usize, pub dataset_bytes: usize, pub dataset_percentage: f64, pub peak_percentage: f64, pub allocator_allocated: usize, pub allocator_active: usize, pub allocator_resident: usize, pub allocator_fragmentation_ratio: f64, pub allocator_fragmentation_bytes: usize, pub allocator_rss_ratio: f64, pub allocator_rss_bytes: usize, pub rss_overhead_ratio: f64, pub rss_overhead_bytes: usize, pub fragmentation: f64, pub fragmentation_bytes: usize, pub additional_stats: HashMap<String, Value>,
}
Expand description

Result for the memory_stats command.

Fields§

§peak_allocated: usize

Peak memory consumed by Redis in bytes (see INFO’s used_memory_peak)

§total_allocated: usize

Total number of bytes allocated by Redis using its allocator (see INFO’s used_memory)

§startup_allocated: usize

Initial amount of memory consumed by Redis at startup in bytes (see INFO’s used_memory_startup)

§replication_backlog: usize

Size in bytes of the replication backlog (see INFO’s repl_backlog_active)

§clients_slaves: usize

The total size in bytes of all replicas overheads (output and query buffers, connection contexts)

§clients_normal: usize

The total size in bytes of all clients overheads (output and query buffers, connection contexts)

§cluster_links: usize

Memory usage by cluster links (Added in Redis 7.0, see INFO’s mem_cluster_links).

§aof_buffer: usize

The summed size in bytes of AOF related buffers.

§lua_caches: usize

the summed size in bytes of the overheads of the Lua scripts’ caches

§functions_caches: usize

the summed size in bytes of the overheads of the functions’ caches

§databases: HashMap<usize, DatabaseOverhead>

For each of the server’s databases (key = db index), the overheads of the main and expiry dictionaries are reported in bytes

§overhead_total: usize

The sum of all overheads, i.e. startup.allocated, replication.backlog, clients.slaves, clients.normal, aof.buffer and those of the internal data structures that are used in managing the Redis keyspace (see INFO’s used_memory_overhead)

§keys_count: usize

The total number of keys stored across all databases in the server

§keys_bytes_per_key: usize

The ratio between net memory usage (total.allocated minus startup.allocated) and keys.count

§dataset_bytes: usize

The size in bytes of the dataset, i.e. overhead.total subtracted from total.allocated (see INFO’s used_memory_dataset)

§dataset_percentage: f64

The percentage of dataset.bytes out of the net memory usage

§peak_percentage: f64

The percentage of peak.allocated out of total.allocated

§allocator_allocated: usize§allocator_active: usize§allocator_resident: usize§allocator_fragmentation_ratio: f64§allocator_fragmentation_bytes: usize§allocator_rss_ratio: f64§allocator_rss_bytes: usize§rss_overhead_ratio: f64§rss_overhead_bytes: usize§fragmentation: f64

See INFO’s mem_fragmentation_ratio

§fragmentation_bytes: usize§additional_stats: HashMap<String, Value>

Trait Implementations§

Source§

impl Debug for MemoryStats

Source§

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

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

impl FromValue for MemoryStats

Source§

fn from_value(value: Value) -> Result<Self>

Used to do Value to user type conversion Read more
Source§

fn from_value_with_command(value: Value, _command: &Command) -> Result<Self>

Source§

fn next_functor<I: Iterator<Item = Value>>() -> Box<dyn FnMut(&mut I) -> Option<Result<Self>>>

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, 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.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> ErasedDestructor for T
where T: 'static,