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: u32

The target task ID

§cpu: Cpu

Staticstics related to CPU time

§memory: Memory

Statistics related to memory, vm

§io: Io

Staticstics related to I/O at syscall surface

§blkio: BlkIo

Statistics related to I/O at block device level

§ctx_switches: ContextSwitches

Statistics related to context switches

§delays: Delays

Statistics related to scheduling delay (delay accounting)

Implementations§

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.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.