Struct Report

Source
pub struct Report {
Show 20 fields pub timestamp: SystemTime, pub duration: Duration, pub start_time: SystemTime, pub system_uptime: Duration, pub global_cpu_usage: f32, pub process_cpu_usage: f32, pub gross_cpu_usage: f32, pub memory_rss: u64, pub memory_virtual: u64, pub memory_swap: u64, pub memory_rss_peak: u64, pub memory_virtual_peak: u64, pub memory_swap_peak: u64, pub disk_read: f32, pub disk_write: f32, pub disk_cancelled: f32, pub io_read: f32, pub io_write: f32, pub io_read_ops: f32, pub io_write_ops: f32,
}
Expand description

Report returned by Meter::report

Note: this structure implements serde::Serialize, and all timestamps and durations are stored as integers in milliseconds.

Fields§

§timestamp: SystemTime

Timestamp

§duration: Duration

The interval time this data has averaged over in milliseconds

§start_time: SystemTime

Start time

§system_uptime: Duration

The uptime of the system

Note this value can be smaller than time since start_time because this value doesn’t include time when system was sleeping

§global_cpu_usage: f32

Whole system CPU usage. 100% is all cores

§process_cpu_usage: f32

Process’ own CPU usage. 100% is a single core

§gross_cpu_usage: f32

Process’ CPU usage with its awaited children. 100% is a single core

§memory_rss: u64

Process’ memory usage

§memory_virtual: u64

Process’ virtual memory usage

§memory_swap: u64

Process’ swap usage

§memory_rss_peak: u64

Process’ peak memory usage (not precise)

§memory_virtual_peak: u64

Process’ peak virtual memory usage (tracked by OS)

§memory_swap_peak: u64

Process’ swap usage (not precise)

§disk_read: f32

Bytes read per second from block-backed filesystems

§disk_write: f32

Bytes written per second from block-backed filesystems

§disk_cancelled: f32

Bytes per second of cancelled writes (i.e. removed temporary files)

§io_read: f32

Bytes read per second (total)

§io_write: f32

Bytes written per second (total)

§io_read_ops: f32

Read operations (syscalls) per second (total)

§io_write_ops: f32

Write operations (syscalls) per second (total)

Trait Implementations§

Source§

impl Debug for Report

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Serialize for Report

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Report

§

impl RefUnwindSafe for Report

§

impl Send for Report

§

impl Sync for Report

§

impl Unpin for Report

§

impl UnwindSafe for Report

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.