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.