pub struct MemcgConfig {
pub field: Vec<i32>,
pub android_scope: Vec<AndroidScope>,
pub poll_period_ms: Option<u32>,
}Expand description
Config for recording memory controller (memcg) values for a set of cgroups.
Fields§
§field: Vec<i32>What values to record, the enum covers both single-valued files (e.g. memory.current) and files with multiple values (e.g. memory.stat). If unset, defaults to {MEMCG_CURRENT, MEMCG_STAT_ANON, MEMCG_STAT_FILE}.
android_scope: Vec<AndroidScope>Android: Which cgroups to record. Can be specified multiple times. If scopes overlap, a given cgroup will be recorded at most once. If unset, defaults to uid-level for all uids.
poll_period_ms: Option<u32>How often to poll the selected cgroups. If zero or unset, records values once. The implementation enforces a minimum on the period (100 ms at the time of writing).
Implementations§
Source§impl MemcgConfig
impl MemcgConfig
Sourcepub fn field(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<MemcgField>> ⓘ
pub fn field( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<MemcgField>> ⓘ
Returns an iterator which yields the valid enum values contained in field.
Sourcepub fn push_field(&mut self, value: MemcgField)
pub fn push_field(&mut self, value: MemcgField)
Appends the provided enum value to field.
Sourcepub fn poll_period_ms(&self) -> u32
pub fn poll_period_ms(&self) -> u32
Returns the value of poll_period_ms, or the default value if poll_period_ms is unset.
Trait Implementations§
Source§impl Clone for MemcgConfig
impl Clone for MemcgConfig
Source§impl Debug for MemcgConfig
impl Debug for MemcgConfig
Source§impl Default for MemcgConfig
impl Default for MemcgConfig
Source§impl Message for MemcgConfig
impl Message for MemcgConfig
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.