pub struct TestPerformanceMonitor {
pub metrics: TestPerformanceMetrics,
pub benchmarks: HashMap<String, BenchmarkComparison>,
pub trends: PerformanceTrends,
pub alert_system: PerformanceAlertSystem,
}Expand description
Performance monitoring for tests
Fields§
§metrics: TestPerformanceMetricsPerformance metrics
benchmarks: HashMap<String, BenchmarkComparison>Benchmark comparisons
trends: PerformanceTrendsPerformance trends
alert_system: PerformanceAlertSystemAlert system
Implementations§
Source§impl TestPerformanceMonitor
impl TestPerformanceMonitor
pub fn new() -> Self
Sourcepub fn record_execution_time(&mut self, duration: Duration)
pub fn record_execution_time(&mut self, duration: Duration)
Record a test execution time
Sourcepub fn update_success_rate(&mut self, success: bool)
pub fn update_success_rate(&mut self, success: bool)
Update success rate
Sourcepub fn set_benchmark(&mut self, name: String, baseline: PerformanceBaseline)
pub fn set_benchmark(&mut self, name: String, baseline: PerformanceBaseline)
Set a benchmark baseline
Sourcepub const fn get_metrics(&self) -> &TestPerformanceMetrics
pub const fn get_metrics(&self) -> &TestPerformanceMetrics
Get current metrics
Sourcepub const fn get_trends(&self) -> &PerformanceTrends
pub const fn get_trends(&self) -> &PerformanceTrends
Get performance trends
Sourcepub fn analyze_trends(&mut self)
pub fn analyze_trends(&mut self)
Analyze trends
Sourcepub fn check_alerts(&mut self)
pub fn check_alerts(&mut self)
Check alert conditions
Auto Trait Implementations§
impl Freeze for TestPerformanceMonitor
impl RefUnwindSafe for TestPerformanceMonitor
impl Send for TestPerformanceMonitor
impl Sync for TestPerformanceMonitor
impl Unpin for TestPerformanceMonitor
impl UnwindSafe for TestPerformanceMonitor
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.