pub struct SystemStats {
pub rss_bytes: u64,
pub cpu_time: Duration,
}Available on crate feature
system-stats only.Expand description
Snapshot of process-level memory and CPU usage.
Build via SystemSampler::sample. Pair before/after samples to
derive deltas during a stress run.
Fields§
§rss_bytes: u64Resident set size at sample time, in bytes.
cpu_time: DurationCumulative CPU time used by the process at sample time.
Implementations§
Source§impl SystemStats
impl SystemStats
Sourcepub fn compare(
name: &str,
before: SystemStats,
after: SystemStats,
peak_rss_bytes_threshold: Option<u64>,
) -> CheckResult
pub fn compare( name: &str, before: SystemStats, after: SystemStats, peak_rss_bytes_threshold: Option<u64>, ) -> CheckResult
Compare a before/after pair and emit a CheckResult.
peak_rss_bytes_threshold flags Fail+Warning when the
after RSS exceeds the threshold. None disables the check.
Always carries the stress, system tags and numeric
evidence for rss_bytes_before, rss_bytes_after,
rss_delta_bytes, cpu_time_before_s, cpu_time_after_s,
cpu_time_delta_s.
Trait Implementations§
Source§impl Clone for SystemStats
impl Clone for SystemStats
Source§fn clone(&self) -> SystemStats
fn clone(&self) -> SystemStats
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SystemStats
impl Debug for SystemStats
Source§impl PartialEq for SystemStats
impl PartialEq for SystemStats
Source§fn eq(&self, other: &SystemStats) -> bool
fn eq(&self, other: &SystemStats) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for SystemStats
impl StructuralPartialEq for SystemStats
Auto Trait Implementations§
impl Freeze for SystemStats
impl RefUnwindSafe for SystemStats
impl Send for SystemStats
impl Sync for SystemStats
impl Unpin for SystemStats
impl UnsafeUnpin for SystemStats
impl UnwindSafe for SystemStats
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