pub struct AppInfo {
pub name: String,
pub category: AppCategory,
pub process_count: usize,
pub total_memory_mb: f64,
pub total_cpu_percent: f32,
pub main_pid: Option<u32>,
pub pids: Vec<u32>,
pub is_idle: bool,
pub idle_duration_secs: u64,
}Expand description
Aggregated app info (groups related processes)
Fields§
§name: String§category: AppCategory§process_count: usize§total_memory_mb: f64§total_cpu_percent: f32§main_pid: Option<u32>§pids: Vec<u32>§is_idle: bool§idle_duration_secs: u64Implementations§
Source§impl AppInfo
impl AppInfo
Sourcepub fn is_memory_hog(&self) -> bool
pub fn is_memory_hog(&self) -> bool
Check if this app is a memory hog (>500MB)
Sourcepub fn is_cpu_intensive(&self) -> bool
pub fn is_cpu_intensive(&self) -> bool
Check if this app is using significant CPU (>10%)
Sourcepub fn optimization_priority(&self) -> f64
pub fn optimization_priority(&self) -> f64
Get optimization priority (higher = optimize first)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AppInfo
impl<'de> Deserialize<'de> for AppInfo
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
Auto Trait Implementations§
impl Freeze for AppInfo
impl RefUnwindSafe for AppInfo
impl Send for AppInfo
impl Sync for AppInfo
impl Unpin for AppInfo
impl UnwindSafe for AppInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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