pub struct PipelineProfiler { /* private fields */ }Expand description
Records per-stage timing samples and provides basic statistics.
Each call to PipelineProfiler::record appends one sample for the
named stage. PipelineProfiler::summary returns mean ± stddev.
Implementations§
Source§impl PipelineProfiler
impl PipelineProfiler
Sourcepub fn record(&mut self, stage_name: &str, ms: f64)
pub fn record(&mut self, stage_name: &str, ms: f64)
Append a timing sample (milliseconds) for stage_name.
Sourcepub fn summary(&self, stage_name: &str) -> Option<(f64, f64, usize)>
pub fn summary(&self, stage_name: &str) -> Option<(f64, f64, usize)>
Returns (mean_ms, stddev_ms, sample_count) for stage_name, or
None if no samples have been recorded.
Sourcepub fn stage_names(&self) -> Vec<&str>
pub fn stage_names(&self) -> Vec<&str>
Return all stage names that have recorded samples.
Sourcepub fn total_samples(&self) -> usize
pub fn total_samples(&self) -> usize
Total number of samples across all stages.
Trait Implementations§
Source§impl Debug for PipelineProfiler
impl Debug for PipelineProfiler
Source§impl Default for PipelineProfiler
impl Default for PipelineProfiler
Source§fn default() -> PipelineProfiler
fn default() -> PipelineProfiler
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PipelineProfiler
impl RefUnwindSafe for PipelineProfiler
impl Send for PipelineProfiler
impl Sync for PipelineProfiler
impl Unpin for PipelineProfiler
impl UnsafeUnpin for PipelineProfiler
impl UnwindSafe for PipelineProfiler
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> 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