pub struct RunningProfiler { /* private fields */ }
Expand description
A handle to a running profiler
Currently just allows for stopping the profiler.
Dropping this handle will request that the profiler will stop.
Implementations§
Source§impl RunningProfiler
impl RunningProfiler
Sourcepub async fn stop(self)
pub async fn stop(self)
Request that the current profiler stops and wait until it exits.
This will cause the currently-pending profile information to be flushed.
After this function returns, it is correct and safe to spawn a new Profiler, possibly with a different configuration. Therefore, this function can be used to “reconfigure” a profiler by stopping it and then starting a new one with a different configuration.
Sourcepub fn detach(self)
pub fn detach(self)
Detach this profiler. This will prevent the profiler from being stopped when this handle is dropped. You should call this (or Profiler::spawn instead of Profiler::spawn_controllable, which does the same thing) if you don’t intend to reconfigure your profiler at runtime.
Auto Trait Implementations§
impl Freeze for RunningProfiler
impl !RefUnwindSafe for RunningProfiler
impl Send for RunningProfiler
impl Sync for RunningProfiler
impl Unpin for RunningProfiler
impl !UnwindSafe for RunningProfiler
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more