pub struct Profile {
pub desc: Vec<String>,
pub cmd: Option<String>,
pub total: u64,
pub functions: BTreeMap<String, Function>,
}Expand description
A parsed cachegrind out file, reduced to instructions per function.
Fields§
§desc: Vec<String>desc: lines, in order.
cmd: Option<String>The cmd: line: what was profiled.
total: u64The summary: total, or the sum of the functions when there is none.
functions: BTreeMap<String, Function>Keyed on the function’s name alone, not on file and name as cachegrind does. Its file is wherever the line came from, and two builds in different checkouts, or with a helper inlined differently, would otherwise disagree about every function in the program.
Implementations§
Source§impl Profile
impl Profile
Sourcepub fn origin(&self) -> Option<Origin>
pub fn origin(&self) -> Option<Origin>
What tak run --profile-dir recorded about where this came from, when
it wrote the file. None for a profile from anywhere else.
Sourcepub fn runner(&self) -> Option<String>
pub fn runner(&self) -> Option<String>
The runner class tak run --profile-dir recorded, if it wrote this.
pub fn load(path: &Path) -> Result<Profile>
Trait Implementations§
impl StructuralPartialEq for Profile
Auto Trait Implementations§
impl Freeze for Profile
impl RefUnwindSafe for Profile
impl Send for Profile
impl Sync for Profile
impl Unpin for Profile
impl UnsafeUnpin for Profile
impl UnwindSafe for Profile
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