pub struct TaskStats {
pub tid: u32,
pub cpu: Cpu,
pub memory: Memory,
pub io: Io,
pub blkio: BlkIo,
pub ctx_switches: ContextSwitches,
pub delays: Delays,
/* private fields */
}Expand description
The taskstats representation for a task.
This struct remaps commonly used struct taskstats fields for primarily:
- Access values with rust’s primitive types
- Better structured organization of group of fields
- Support serialization
There are more (but may not much interested) fields in the original
struct taskstats and they are accessible through obtaining the original
struct by TaskStats#inner().
Fields§
§tid: u32The target task ID
cpu: CpuStaticstics related to CPU time
memory: MemoryStatistics related to memory, vm
io: IoStaticstics related to I/O at syscall surface
blkio: BlkIoStatistics related to I/O at block device level
ctx_switches: ContextSwitchesStatistics related to context switches
delays: DelaysStatistics related to scheduling delay (delay accounting)
Implementations§
Source§impl TaskStats
impl TaskStats
Sourcepub fn inner(&self) -> &taskstats
pub fn inner(&self) -> &taskstats
Return inner representation of taskstats.
The returned value is an instance of struct taskstats that was
received from kernel.
TaskStats remaps most of its fields into rust-friendly types and
structure, so this inner object should be referred only when the user
wants to access more information than available in remapped fields.