Skip to main content

Module config

Module config 

Source
Expand description

Configuration (private module)

Re-exportsΒ§

use std::sync::LazyLock; πŸ”’
use sysinfo::MemoryRefreshKind; πŸ”’
use sysinfo::System; πŸ”’
use tracing::warn; πŸ”’
use crate::internal_prelude::*; πŸ”’

MacrosΒ§

derive_deftly_template_QtySetters πŸ”’
Define setters on the builder for every field of type Qty

StructsΒ§

Config
Configuration for a memory data tracker
ConfigBuilder
Configuration for a memory data tracker (builder)
ConfigInner
Configuration, if enabled

EnumsΒ§

MemQueryError πŸ”’
An error when we are unable to obtain the system’s total available memory.

ConstantsΒ§

MAX_LOW_WATER_RATIO πŸ”’
Minimum hysteresis
MIN_MAX_PARTICIPANTS πŸ”’
We want to support at least this many participants with a cache each

FunctionsΒ§

compute_max_from_total_system_mem πŸ”’
Determine a max given the system’s total available memory.
to_usize_saturating πŸ”’
Convert a u64 to a usize, saturating if the value would overflow.
total_available_memory πŸ”’
The total available memory in bytes.