pub struct CgroupModel {
pub data: SingleCgroupModel,
pub children: BTreeSet<CgroupModel>,
pub count: u32,
pub recreate_flag: bool,
}
Expand description
A model that represents a cgroup subtree. Each instance is a node that uses the “data” field to represent local data. Otherwise mixing hierarchy and data makes it hard to define a Field Id type that queries nested cgroups.
Fields§
§data: SingleCgroupModel
§children: BTreeSet<CgroupModel>
§count: u32
Total number of cgroups under this subtree, including self
recreate_flag: bool
Indicate if such cgroup is created
Implementations§
Source§impl CgroupModel
impl CgroupModel
pub fn new( name: String, full_path: String, depth: u32, sample: &CgroupSample, last: Option<(&CgroupSample, Duration)>, ) -> CgroupModel
pub fn aggr_top_level_val(self) -> Self
pub fn get_by_path_str(&self, path: &str) -> Option<&CgroupModel>
Trait Implementations§
Source§impl Borrow<str> for CgroupModel
impl Borrow<str> for CgroupModel
Source§impl Clone for CgroupModel
impl Clone for CgroupModel
Source§fn clone(&self) -> CgroupModel
fn clone(&self) -> CgroupModel
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CgroupModel
impl Debug for CgroupModel
Source§impl Default for CgroupModel
impl Default for CgroupModel
Source§fn default() -> CgroupModel
fn default() -> CgroupModel
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CgroupModel
impl<'de> Deserialize<'de> for CgroupModel
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Nameable for CgroupModel
impl Nameable for CgroupModel
Source§impl Ord for CgroupModel
impl Ord for CgroupModel
Source§impl PartialEq for CgroupModel
impl PartialEq for CgroupModel
Source§impl PartialOrd for CgroupModel
impl PartialOrd for CgroupModel
Source§impl QueriableContainer for CgroupModel
impl QueriableContainer for CgroupModel
const IDX_PLACEHOLDER: &'static str = "[path:/<cgroup_path>/.]"
type Idx = CgroupPath
type SubqueryId = SingleCgroupModelFieldId
fn split(s: &str) -> Option<(&str, &str)>
fn get_item(&self, idx: &Self::Idx) -> Option<&SingleCgroupModel>
Source§impl Serialize for CgroupModel
impl Serialize for CgroupModel
impl Eq for CgroupModel
Auto Trait Implementations§
impl Freeze for CgroupModel
impl RefUnwindSafe for CgroupModel
impl Send for CgroupModel
impl Sync for CgroupModel
impl Unpin for CgroupModel
impl UnwindSafe for CgroupModel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more