pub struct FlameGraph {
pub root: FlameNode,
pub total_samples: u64,
}Expand description
A flame graph built from sampling profiler data.
Fields§
§root: FlameNodeRoot node (synthetic “all” node).
total_samples: u64Total sample count.
Implementations§
Source§impl FlameGraph
impl FlameGraph
Sourcepub fn add_stack(&mut self, stack: &[String])
pub fn add_stack(&mut self, stack: &[String])
Add a call stack to the flame graph (stack is bottom-to-top order).
Sourcepub fn from_profiler(profiler: &SamplingProfiler) -> Self
pub fn from_profiler(profiler: &SamplingProfiler) -> Self
Build a flame graph from a sampling profiler.
Sourcepub fn render_text(&self) -> String
pub fn render_text(&self) -> String
Render the flame graph as indented text.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FlameGraph
impl RefUnwindSafe for FlameGraph
impl Send for FlameGraph
impl Sync for FlameGraph
impl Unpin for FlameGraph
impl UnsafeUnpin for FlameGraph
impl UnwindSafe for FlameGraph
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