pub struct Sample {
pub stack: Vec<usize>,
pub live_objects: usize,
pub live_bytes: usize,
pub accum_objects: usize,
pub accum_bytes: usize,
}Expand description
One sampled call stack, copied out of the profiler by samples.
Fields§
§stack: Vec<usize>§live_objects: usize§live_bytes: usize§accum_objects: usize§accum_bytes: usizeImplementations§
Source§impl Sample
impl Sample
Sourcepub fn estimated_bytes(&self, sample_rate: usize) -> u64
pub fn estimated_bytes(&self, sample_rate: usize) -> u64
Estimate the un-sampled byte volume behind this sample.
Mirrors pprof’s legacy heap-sample scaling formula
(scaleHeapSample in pprof’s profile/legacy_profile.go),
which corrects for the bias a Poisson sampling process with mean
interval sample_rate introduces toward larger allocations.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sample
impl RefUnwindSafe for Sample
impl Send for Sample
impl Sync for Sample
impl Unpin for Sample
impl UnsafeUnpin for Sample
impl UnwindSafe for Sample
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