pub struct Recorder { /* private fields */ }
Available on crate feature
profile
only.Expand description
Utility to record profiling information to a file.
Implementations§
Source§impl Recorder
impl Recorder
Sourcepub fn new(filename: &str) -> Result<Recorder>
pub fn new(filename: &str) -> Result<Recorder>
Creates a new recorder which will write to the specified filename.
Sourcepub fn add_function(&mut self, name: &str, code: &[u8]) -> Result<()>
pub fn add_function(&mut self, name: &str, code: &[u8]) -> Result<()>
Adds a new function that may be sampled in the future.
This must be given code
where it resides and will be executed in the
host address space.
Sourcepub fn add_samples(&mut self, samples: &mut Samples) -> Result<()>
pub fn add_samples(&mut self, samples: &mut Samples) -> Result<()>
Adds a new set of samples to this recorded.
Auto Trait Implementations§
impl Freeze for Recorder
impl RefUnwindSafe for Recorder
impl Send for Recorder
impl Sync for Recorder
impl Unpin for Recorder
impl UnwindSafe for Recorder
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