pub struct App {Show 36 fields
pub view: View,
pub theme: Theme,
pub support: ColorSupport,
pub lang: Lang,
pub help: Option<HelpState>,
pub hits: Vec<Hit>,
pub sort: SortKey,
pub cgroup_sort: CgroupSort,
pub cgroup_sel: usize,
pub app_groups: Vec<AppGroup>,
pub app_history: HashMap<String, VecDeque<AppSample>>,
pub app_sel: usize,
pub app_metric: AppMetric,
pub app_state: TableState,
pub pid_filter: Option<HashSet<u32>>,
pub pid_filter_name: Option<String>,
pub drill: Option<String>,
pub drill_sel: usize,
pub desc: bool,
pub filter: String,
pub detail_filter: String,
pub expanded: HashSet<String>,
pub editing: bool,
pub editing_detail: bool,
pub edit_buf: String,
pub sel: usize,
pub detail: bool,
pub detail_sel: usize,
pub snap: Option<Snapshot>,
pub table_state: TableState,
pub cgroup_state: TableState,
pub drill_state: TableState,
pub detail_state: TableState,
pub history: HashMap<u32, VecDeque<u64>>,
pub cgroup_history: HashMap<String, VecDeque<u64>>,
pub oom_history: HashMap<String, VecDeque<u64>>,
/* private fields */
}Fields§
§view: View§theme: ThemeActive built-in theme; t cycles it.
support: ColorSupportTerminal colour depth the active palette was rendered for.
lang: LangUI language; l toggles it.
help: Option<HelpState>Open help overlay, if any.
hits: Vec<Hit>Click targets recorded by the last draw.
sort: SortKey§cgroup_sort: CgroupSort§cgroup_sel: usize§app_groups: Vec<AppGroup>App groups for the treemap, recomputed per snapshot (collapsed to the top few percent so the map does not dissolve into slivers).
app_history: HashMap<String, VecDeque<AppSample>>Metric history per app name (only the collapsed groups are tracked: ~20-40 entries, not all 330).
app_sel: usize§app_metric: AppMetric§app_state: TableState§pid_filter: Option<HashSet<u32>>Drill target coming from the apps view: only these pids are shown in the process table.
pid_filter_name: Option<String>§drill: Option<String>cgroup path whose processes are being listed (drill-down).
drill_sel: usize§desc: bool§filter: String§detail_filter: StringMapping-name filter for the VMA detail view (independent of filter).
expanded: HashSet<String>Group labels whose VMAs are expanded.
editing: bool§editing_detail: boolWhether the in-progress edit targets the detail filter.
edit_buf: String§sel: usize§detail: bool§detail_sel: usize§snap: Option<Snapshot>§table_state: TableState§cgroup_state: TableState§drill_state: TableState§detail_state: TableState§history: HashMap<u32, VecDeque<u64>>§cgroup_history: HashMap<String, VecDeque<u64>>PSI some avg10 over time per cgroup, stored as percent*10 for the
sparkline (u64) with a fixed 0-1000 scale.
oom_history: HashMap<String, VecDeque<u64>>OOM kills per scan per cgroup (5 s cadence, 120 samples = 10 min).
Implementations§
Source§impl App
impl App
pub fn new(start_pid: Option<u32>) -> Self
pub fn visible(&self) -> Vec<&ProcRow>
pub fn visible_cgroups(&self) -> Vec<&CgroupMem>
Sourcepub fn cgroup_members(&self) -> Vec<&ProcRow>
pub fn cgroup_members(&self) -> Vec<&ProcRow>
Processes whose cgroup is drill or a descendant of it. The cgroup
numbers are hierarchical, so the subtree is what you want to see.
Sourcepub fn app_series(&self, name: &str, metric: AppMetric) -> Vec<u64>
pub fn app_series(&self, name: &str, metric: AppMetric) -> Vec<u64>
Series for the selected metric of name, for the header sparkline.
pub fn visible_apps(&self) -> Vec<&AppGroup>
pub fn selected_app(&self) -> Option<&AppGroup>
pub fn selected_pid(&self) -> Option<u32>
Sourcepub fn focus_target(&self) -> (Option<u32>, bool)
pub fn focus_target(&self) -> (Option<u32>, bool)
The (pid, want_detail) pair the sampler should be working on.
pub fn take_focus_update(&mut self) -> Option<Focus>
pub fn on_snapshot(&mut self, snap: Snapshot)
Sourcepub fn detail_rows(&self) -> Vec<DetailRow<'_>>
pub fn detail_rows(&self) -> Vec<DetailRow<'_>>
Flattened detail rows: every matching group, followed by its VMAs when expanded. Selection indexes into this vector.
pub fn detail_len(&self) -> usize
pub fn on_mouse(&mut self, mouse: MouseEvent) -> bool
pub fn handle_event(&mut self, event: Event) -> bool
pub fn run( terminal: &mut DefaultTerminal, start_pid: Option<u32>, theme: Theme, support: ColorSupport, lang: Lang, tx: Sender<Focus>, rx: Receiver<Snapshot>, ) -> Result<()>
pub fn sample_age_ms(&self) -> u128
Auto Trait Implementations§
impl Freeze for App
impl RefUnwindSafe for App
impl Send for App
impl Sync for App
impl Unpin for App
impl UnsafeUnpin for App
impl UnwindSafe for App
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more