pub struct FirefoxProfile { /* private fields */ }
Expand description
The top-level structure representing a profile that can be consumed by the Firefox profiler. This will be exported mostly as-is to JSON at the end of a tracing session.
Based off of https://github.com/firefox-devtools/profiler/blob/main/src/types/profile.js.
Implementations§
source§impl FirefoxProfile
impl FirefoxProfile
sourcepub fn new(info: TraceInitialization) -> FirefoxProfile
pub fn new(info: TraceInitialization) -> FirefoxProfile
Create a new FirefoxProfile
representing a given trace.
sourcepub fn register_thread(&mut self) -> FirefoxProfileThreadId
pub fn register_thread(&mut self) -> FirefoxProfileThreadId
Register a new thread, allowing us to parse traces for it without needing ownership of the
FirefoxProfile
object.
sourcepub fn finalize_thread(&mut self, thread: FirefoxThread)
pub fn finalize_thread(&mut self, thread: FirefoxThread)
Finalize this thread, attaching it to the profile.