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 Forget for Profile
impl Freeze for Profilewhere
*const u8 is !null: Freeze,
PhantomData<String>: Freeze,
PhantomData<u8>: Freeze,
*const LeafNode<String, Function> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Function)>>: Freeze,
impl Move for Profile
impl RefUnwindSafe for Profile
impl Send for Profile
impl Sync for Profile
impl Unpin for Profile
impl UnsafeUnpin for Profilewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const LeafNode<String, Function> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Function)>>: UnsafeUnpin,
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