pub struct TimestampProfiler { /* private fields */ }
Expand description
A simple struct to keep track of timestamps for kernel execution. This should be used for servers that do not have native device profiling.
Implementations§
Source§impl TimestampProfiler
impl TimestampProfiler
Sourcepub fn start(&mut self) -> ProfilingToken
pub fn start(&mut self) -> ProfilingToken
Start measuring
Sourcepub fn stop(
&mut self,
token: ProfilingToken,
) -> Result<ProfileDuration, ProfileError>
pub fn stop( &mut self, token: ProfilingToken, ) -> Result<ProfileDuration, ProfileError>
Stop measuring
Sourcepub fn error(&mut self, error: ProfileError)
pub fn error(&mut self, error: ProfileError)
Register an error during profiling.
Trait Implementations§
Source§impl Debug for TimestampProfiler
impl Debug for TimestampProfiler
Source§impl Default for TimestampProfiler
impl Default for TimestampProfiler
Source§fn default() -> TimestampProfiler
fn default() -> TimestampProfiler
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TimestampProfiler
impl RefUnwindSafe for TimestampProfiler
impl Send for TimestampProfiler
impl Sync for TimestampProfiler
impl Unpin for TimestampProfiler
impl UnwindSafe for TimestampProfiler
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