pub struct MetricsTracker { /* private fields */ }Expand description
Metrics tracker for continuous measurement
Implementations§
Source§impl MetricsTracker
impl MetricsTracker
Sourcepub fn with_default_path() -> Self
pub fn with_default_path() -> Self
Create with default storage path
Sourcepub fn record(&mut self, record: ExecutionRecord) -> Result<()>
pub fn record(&mut self, record: ExecutionRecord) -> Result<()>
Record an execution
Sourcepub fn load_all(&mut self) -> Result<Vec<ExecutionRecord>>
pub fn load_all(&mut self) -> Result<Vec<ExecutionRecord>>
Load all records from storage
Sourcepub fn get_records(&self, protocol_or_profile: &str) -> Vec<&ExecutionRecord>
pub fn get_records(&self, protocol_or_profile: &str) -> Vec<&ExecutionRecord>
Get records for a specific protocol or profile
Sourcepub fn calculate_stats(&self, protocol_or_profile: &str) -> AggregateStats
pub fn calculate_stats(&self, protocol_or_profile: &str) -> AggregateStats
Calculate aggregate statistics for a protocol or profile
Sourcepub fn generate_report(&self) -> MetricsReport
pub fn generate_report(&self) -> MetricsReport
Generate a comprehensive report
Sourcepub fn storage_path(&self) -> &Path
pub fn storage_path(&self) -> &Path
Get the storage path
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MetricsTracker
impl RefUnwindSafe for MetricsTracker
impl Send for MetricsTracker
impl Sync for MetricsTracker
impl Unpin for MetricsTracker
impl UnwindSafe for MetricsTracker
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> 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