pub struct MonitoringSession {
pub name: String,
pub start_time: Instant,
pub metrics: Vec<TransformationMetrics>,
pub config: MonitoringConfig,
}Expand description
Pipeline monitoring session
Fields§
§name: StringSession name
start_time: InstantStart time
metrics: Vec<TransformationMetrics>All transformation metrics
config: MonitoringConfigSession configuration
Implementations§
Source§impl MonitoringSession
impl MonitoringSession
Sourcepub fn with_config(name: String, config: MonitoringConfig) -> Self
pub fn with_config(name: String, config: MonitoringConfig) -> Self
Create a session with custom configuration
Sourcepub fn start_transformation(
&mut self,
name: String,
input: &Array2<f64>,
) -> usize
pub fn start_transformation( &mut self, name: String, input: &Array2<f64>, ) -> usize
Start tracking a transformation
Sourcepub fn complete_transformation(
&mut self,
index: usize,
output: &Array2<f64>,
) -> Result<(), String>
pub fn complete_transformation( &mut self, index: usize, output: &Array2<f64>, ) -> Result<(), String>
Complete a transformation
Sourcepub fn fail_transformation(
&mut self,
index: usize,
error: String,
) -> Result<(), String>
pub fn fail_transformation( &mut self, index: usize, error: String, ) -> Result<(), String>
Fail a transformation
Sourcepub fn total_duration(&self) -> Duration
pub fn total_duration(&self) -> Duration
Get total session duration
Sourcepub fn total_processing_time(&self) -> f64
pub fn total_processing_time(&self) -> f64
Get total processing time (sum of all transformations)
Sourcepub fn average_throughput(&self) -> Option<f64>
pub fn average_throughput(&self) -> Option<f64>
Get average throughput
Sourcepub fn successful_count(&self) -> usize
pub fn successful_count(&self) -> usize
Get successful transformations
Sourcepub fn failed_count(&self) -> usize
pub fn failed_count(&self) -> usize
Get failed transformations
Sourcepub fn summary(&self) -> MonitoringSummary
pub fn summary(&self) -> MonitoringSummary
Generate summary report
Sourcepub fn print_summary(&self)
pub fn print_summary(&self)
Print summary
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MonitoringSession
impl RefUnwindSafe for MonitoringSession
impl Send for MonitoringSession
impl Sync for MonitoringSession
impl Unpin for MonitoringSession
impl UnwindSafe for MonitoringSession
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