[][src]Struct sandboxfs::ScopedProfiler

pub struct ScopedProfiler {}

Facade for cpuprofiler::PROFILER to cope with the optional gperftools dependency and to ensure profiling stops on drop.

Methods

impl ScopedProfiler[src]

pub fn start<P: AsRef<Path>>(path: P) -> Fallible<ScopedProfiler>[src]

Starts the CPU profiler and stores the profile in the given path.

This will fail if sandboxfs was built without the "profiler" feature. This may fail if there are problems initializing the profiler.

Note that, due to the nature of profiling, there can only be one ScopedPointer active at any given time. Trying to create two instances of this will cause this method to block until the other object is dropped.

Trait Implementations

impl Drop for ScopedProfiler[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.