pub struct MemorySnapshot {
pub captured_at_unix_ms: u64,
pub capture_mode: CaptureMode,
pub allocation_stats: Allocations,
pub pprof: PprofSummary,
pub allocator: AllocatorSnapshot,
pub cgroup: Option<MemoryStat>,
pub smaps: Option<ProcessStats>,
}Expand description
Best-effort snapshot of allocation and memory state for the current process created by snapshot().
Snapshot collection never fails as a whole. Optional fields are None when
the corresponding operating-system or allocator probe is unavailable.
Fields§
§captured_at_unix_ms: u64Wall-clock capture time as milliseconds since the Unix epoch.
capture_mode: CaptureModeStack capture implementation compiled into this build.
allocation_stats: AllocationsCoarse process-wide counters from allocation_stats.
pprof: PprofSummarySummary of recorded pprof stack-attributed allocation data.
allocator: AllocatorSnapshotActive allocator identity and allocator-specific memory stats, if available.
cgroup: Option<MemoryStat>cgroup v2 memory stats for this process, when available.
smaps: Option<ProcessStats>/proc/self/smaps_rollup memory stats for this process, when available.
Trait Implementations§
Source§impl Clone for MemorySnapshot
impl Clone for MemorySnapshot
Source§fn clone(&self) -> MemorySnapshot
fn clone(&self) -> MemorySnapshot
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 MemorySnapshot
impl Debug for MemorySnapshot
Auto Trait Implementations§
impl Freeze for MemorySnapshot
impl RefUnwindSafe for MemorySnapshot
impl Send for MemorySnapshot
impl Sync for MemorySnapshot
impl Unpin for MemorySnapshot
impl UnsafeUnpin for MemorySnapshot
impl UnwindSafe for MemorySnapshot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more