pub struct ChildProcessInfo {
pub child_count: u32,
pub active_child_count: u32,
pub cpu_time_ms: u64,
pub descendant_pid_signature: u64,
}Expand description
Information about child processes of a given parent.
Used by the idle-timeout monitor to determine whether child processes are currently active versus merely present but stalled.
Fields§
§child_count: u32Number of live child processes found.
active_child_count: u32Number of descendants that are currently in an active process state.
This counts descendants that are actively running or blocked in a state that still indicates current work, rather than merely sleeping with historical CPU usage.
cpu_time_ms: u64Cumulative CPU time in milliseconds across all child processes.
This remains useful for observability when child work is present but no longer current enough to suppress the idle timeout.
descendant_pid_signature: u64Deterministic signature of the current descendant PID set.
This lets the idle-timeout monitor distinguish “the same child subtree is still running” from “the old subtree exited and a new one replaced it between polls”, even when the cumulative CPU time drops or resets.
Implementations§
Source§impl ChildProcessInfo
impl ChildProcessInfo
Sourcepub const fn has_children(&self) -> bool
pub const fn has_children(&self) -> bool
Whether any child processes exist.
Sourcepub const fn has_currently_active_children(&self) -> bool
pub const fn has_currently_active_children(&self) -> bool
Whether any child processes are currently active enough to suppress timeout.
Sourcepub const fn has_stalled_children(&self) -> bool
pub const fn has_stalled_children(&self) -> bool
Whether descendants are still observable but no longer show current work.
Sourcepub const fn shows_fresh_progress_since(&self, previous: Self) -> bool
pub const fn shows_fresh_progress_since(&self, previous: Self) -> bool
Whether the latest snapshot proves fresh current work relative to a previous observation.
Fresh work can show up either as additional CPU time from the same descendant set or as a still-active replacement descendant set, which is common for shells and build tools that churn worker PIDs between polls.
Trait Implementations§
Source§impl Clone for ChildProcessInfo
impl Clone for ChildProcessInfo
Source§fn clone(&self) -> ChildProcessInfo
fn clone(&self) -> ChildProcessInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ChildProcessInfo
impl Debug for ChildProcessInfo
Source§impl<'de> Deserialize<'de> for ChildProcessInfo
impl<'de> Deserialize<'de> for ChildProcessInfo
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>,
Source§impl PartialEq for ChildProcessInfo
impl PartialEq for ChildProcessInfo
Source§impl Serialize for ChildProcessInfo
impl Serialize for ChildProcessInfo
impl Copy for ChildProcessInfo
impl Eq for ChildProcessInfo
impl StructuralPartialEq for ChildProcessInfo
Auto Trait Implementations§
impl Freeze for ChildProcessInfo
impl RefUnwindSafe for ChildProcessInfo
impl Send for ChildProcessInfo
impl Sync for ChildProcessInfo
impl Unpin for ChildProcessInfo
impl UnsafeUnpin for ChildProcessInfo
impl UnwindSafe for ChildProcessInfo
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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