pub struct PerformanceProfiler { /* private fields */ }Expand description
Performance profiler for monitoring execution
Implementations§
Source§impl PerformanceProfiler
impl PerformanceProfiler
Sourcepub fn stop(&self) -> PerformanceResult<PerformanceMetrics>
pub fn stop(&self) -> PerformanceResult<PerformanceMetrics>
Stop profiling and return metrics
Sourcepub fn record_operation(&mut self)
pub fn record_operation(&mut self)
Record an operation
Sourcepub fn record_operations(&mut self, count: u64)
pub fn record_operations(&mut self, count: u64)
Record multiple operations
Sourcepub fn record_samples(&mut self, count: u64)
pub fn record_samples(&mut self, count: u64)
Record samples processed
Sourcepub fn record_allocation(&self, bytes: u64)
pub fn record_allocation(&self, bytes: u64)
Simulate memory allocation (for testing purposes)
Sourcepub fn record_deallocation(&self, bytes: u64)
pub fn record_deallocation(&self, bytes: u64)
Simulate memory deallocation (for testing purposes)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PerformanceProfiler
impl RefUnwindSafe for PerformanceProfiler
impl Send for PerformanceProfiler
impl Sync for PerformanceProfiler
impl Unpin for PerformanceProfiler
impl UnsafeUnpin for PerformanceProfiler
impl UnwindSafe for PerformanceProfiler
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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