pub struct Metrics {
pub cpu_seconds_total: Option<f64>,
pub open_fds: Option<u64>,
pub max_fds: Option<u64>,
pub virtual_memory_bytes: Option<u64>,
pub virtual_memory_max_bytes: Option<u64>,
pub resident_memory_bytes: Option<u64>,
pub start_time_seconds: Option<u64>,
pub threads: Option<u64>,
}
Expand description
Standard Prometheus process metrics.
This struct describes the standard set of Prometheus process metrics as described at https://prometheus.io/docs/instrumenting/writing_clientlibs/#process-metrics.
To create a populated struct for the running process use the collect
function. The
Default
impl does not populate any metrics.
Fields§
§cpu_seconds_total: Option<f64>
Total user and system CPU time spent in seconds.
open_fds: Option<u64>
Number of open file descriptors.
max_fds: Option<u64>
Maximum number of open file descriptors.
0 indicates ‘unlimited’.
virtual_memory_bytes: Option<u64>
Virtual memory size in bytes.
virtual_memory_max_bytes: Option<u64>
Maximum amount of virtual memory available in bytes.
0 indicates ‘unlimited’.
resident_memory_bytes: Option<u64>
Resident memory size in bytes.
start_time_seconds: Option<u64>
Start time of the process since unix epoch in seconds.
threads: Option<u64>
Numberof OS threads in the process.
Trait Implementations§
impl StructuralPartialEq for Metrics
Auto Trait Implementations§
impl Freeze for Metrics
impl RefUnwindSafe for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnwindSafe for Metrics
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