[][src]Struct functiontrace_server::profile_generator::FirefoxProfile

pub struct FirefoxProfile { /* fields omitted */ }

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

impl FirefoxProfile[src]

pub fn new(info: TraceInitialization) -> FirefoxProfile[src]

Create a new FirefoxProfile representing a given trace.

pub fn register_thread(&mut self) -> FirefoxProfileThreadId[src]

Register a new thread, allowing us to parse traces for it without needing ownership of the FirefoxProfile object.

pub fn finalize_thread(&mut self, thread: FirefoxThread)[src]

Finalize this thread, attaching it to the profile.

pub fn export(&mut self, output_dir: PathBuf) -> Result<()>[src]

Export the recorded profile to the given output directory.

Trait Implementations

impl Debug for FirefoxProfile[src]

impl Serialize for FirefoxProfile[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.