pub struct ProfileData {
pub call_counts: HashMap<String, u64>,
pub hot_functions: Vec<String>,
pub edge_counts: HashMap<(String, String), u64>,
}Expand description
Collected profiling data: call frequencies and call-graph edge weights.
Fields§
§call_counts: HashMap<String, u64>How many times each function was called.
hot_functions: Vec<String>Functions whose call count exceeds the hot threshold.
edge_counts: HashMap<(String, String), u64>Edge weights in the dynamic call graph: (caller, callee) -> count.
Implementations§
Source§impl ProfileData
impl ProfileData
Sourcepub fn record_call(&mut self, func: &str)
pub fn record_call(&mut self, func: &str)
Record one call to func.
Sourcepub fn record_edge(&mut self, caller: &str, callee: &str)
pub fn record_edge(&mut self, caller: &str, callee: &str)
Record one traversal of the call-graph edge caller → callee.
Trait Implementations§
Source§impl Clone for ProfileData
impl Clone for ProfileData
Source§fn clone(&self) -> ProfileData
fn clone(&self) -> ProfileData
Returns a duplicate of the value. Read more
1.0.0 · 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 ProfileData
impl Debug for ProfileData
Source§impl Default for ProfileData
impl Default for ProfileData
Source§fn default() -> ProfileData
fn default() -> ProfileData
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ProfileData
impl RefUnwindSafe for ProfileData
impl Send for ProfileData
impl Sync for ProfileData
impl Unpin for ProfileData
impl UnsafeUnpin for ProfileData
impl UnwindSafe for ProfileData
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