pub struct FfiProfiler { /* private fields */ }Expand description
FFI profiler for measuring call overhead
Implementations§
Source§impl FfiProfiler
impl FfiProfiler
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if profiling is enabled
Sourcepub fn start(&self, name: &str) -> FfiCallGuard
pub fn start(&self, name: &str) -> FfiCallGuard
Start profiling a function call
Sourcepub fn get_stats(&self, name: &str) -> Option<FfiCallStats>
pub fn get_stats(&self, name: &str) -> Option<FfiCallStats>
Get statistics for a specific function
Sourcepub fn get_all_stats(&self) -> Vec<FfiCallStats>
pub fn get_all_stats(&self) -> Vec<FfiCallStats>
Get all statistics
Sourcepub fn get_hotspots(&self) -> Vec<FfiCallStats>
pub fn get_hotspots(&self) -> Vec<FfiCallStats>
Get statistics sorted by average duration
Sourcepub fn total_overhead(&self) -> Duration
pub fn total_overhead(&self) -> Duration
Get total overhead
Sourcepub fn report(&self) -> ProfilingReport
pub fn report(&self) -> ProfilingReport
Generate profiling report
Trait Implementations§
Source§impl Clone for FfiProfiler
impl Clone for FfiProfiler
Auto Trait Implementations§
impl Freeze for FfiProfiler
impl !RefUnwindSafe for FfiProfiler
impl Send for FfiProfiler
impl Sync for FfiProfiler
impl Unpin for FfiProfiler
impl !UnwindSafe for FfiProfiler
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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