pub struct ThreadMetrics {
pub os_tid: u64,
pub name: String,
pub cpu_user: f64,
pub cpu_sys: f64,
pub cpu_total: f64,
pub cpu_percent: Option<f64>,
}Expand description
Thread metrics collected from the OS.
Fields§
§os_tid: u64Operating system thread ID (Mach port on macOS)
name: StringThread name (if available)
cpu_user: f64CPU time spent in user mode (seconds)
cpu_sys: f64CPU time spent in system/kernel mode (seconds)
cpu_total: f64Total CPU time (user + system, seconds)
cpu_percent: Option<f64>CPU usage percentage (based on delta from previous sample) None if this is the first sample
Implementations§
Source§impl ThreadMetrics
impl ThreadMetrics
Trait Implementations§
Source§impl Clone for ThreadMetrics
impl Clone for ThreadMetrics
Source§fn clone(&self) -> ThreadMetrics
fn clone(&self) -> ThreadMetrics
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 ThreadMetrics
impl Debug for ThreadMetrics
Source§impl<'de> Deserialize<'de> for ThreadMetrics
impl<'de> Deserialize<'de> for ThreadMetrics
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 ThreadMetrics
impl RefUnwindSafe for ThreadMetrics
impl Send for ThreadMetrics
impl Sync for ThreadMetrics
impl Unpin for ThreadMetrics
impl UnwindSafe for ThreadMetrics
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