pub struct StackStats {
pub allocated_bytes: u64,
pub num_allocations: u64,
pub freed_bytes: u64,
pub num_frees: u64,
/* private fields */
}Expand description
Central struct collecting stats about each stack trace
Fields§
§allocated_bytes: u64§num_allocations: u64§freed_bytes: u64§num_frees: u64Implementations§
Source§impl StackStats
impl StackStats
Sourcepub fn retained_profiled_bytes(&self) -> u64
pub fn retained_profiled_bytes(&self) -> u64
The number of “retained” bytes as seen by this stack from sampling
Sourcepub fn rich_report(
&self,
profiler: &YingProfiler,
with_filenames: bool,
expand_frame: bool,
) -> String
pub fn rich_report( &self, profiler: &YingProfiler, with_filenames: bool, expand_frame: bool, ) -> String
Create a rich multi-line report of this StackStats
- profiler: The
&YING_ALLOCor global static defined to enable this profiler - with_filenames - if True, include source filename in stack trace
- expand_frame - if True, include inlined symbols for each frame in each stack trace
Sourcepub fn dtrace_report(
&self,
profiler: &YingProfiler,
measurement: Measurement,
) -> String
pub fn dtrace_report( &self, profiler: &YingProfiler, measurement: Measurement, ) -> String
Creates a really simple dtrace-compatible multi line string report, with a single measurement at the end. An empty line will be appended at the end. DTrace reports always have inlining > turned off.
- profiler: The
&YING_ALLOCor global static defined to enable this profiler - measurement - enum for what to measure, allocated bytes or retained bytes
Trait Implementations§
Source§impl Clone for StackStats
impl Clone for StackStats
Source§fn clone(&self) -> StackStats
fn clone(&self) -> StackStats
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 moreAuto Trait Implementations§
impl Freeze for StackStats
impl RefUnwindSafe for StackStats
impl Send for StackStats
impl Sync for StackStats
impl Unpin for StackStats
impl UnsafeUnpin for StackStats
impl UnwindSafe for StackStats
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