pub struct TransformationMetrics {
pub name: String,
pub start_time: Option<Instant>,
pub end_time: Option<Instant>,
pub duration_ms: Option<f64>,
pub input_shape: (usize, usize),
pub output_shape: (usize, usize),
pub memory_bytes: Option<usize>,
pub input_nan_count: usize,
pub output_nan_count: usize,
pub success: bool,
pub error_message: Option<String>,
pub custom_metrics: HashMap<String, f64>,
}Expand description
Transformation metrics collected during preprocessing
Fields§
§name: StringTransformation name
start_time: Option<Instant>Start time
end_time: Option<Instant>End time
duration_ms: Option<f64>Duration in milliseconds
input_shape: (usize, usize)Input shape (rows, cols)
output_shape: (usize, usize)Output shape (rows, cols)
memory_bytes: Option<usize>Memory usage in bytes
input_nan_count: usizeNumber of NaN values in input
output_nan_count: usizeNumber of NaN values in output
success: boolTransformation success
error_message: Option<String>Error message if failed
custom_metrics: HashMap<String, f64>Custom metrics
Implementations§
Source§impl TransformationMetrics
impl TransformationMetrics
Sourcepub fn new(name: String, input_shape: (usize, usize)) -> Self
pub fn new(name: String, input_shape: (usize, usize)) -> Self
Create new transformation metrics
Sourcepub fn add_metric(&mut self, name: String, value: f64)
pub fn add_metric(&mut self, name: String, value: f64)
Add custom metric
Sourcepub fn throughput(&self) -> Option<f64>
pub fn throughput(&self) -> Option<f64>
Get throughput (elements per second)
Sourcepub fn memory_efficiency(&self) -> Option<f64>
pub fn memory_efficiency(&self) -> Option<f64>
Get memory efficiency (bytes per element)
Trait Implementations§
Source§impl Clone for TransformationMetrics
impl Clone for TransformationMetrics
Source§fn clone(&self) -> TransformationMetrics
fn clone(&self) -> TransformationMetrics
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TransformationMetrics
impl RefUnwindSafe for TransformationMetrics
impl Send for TransformationMetrics
impl Sync for TransformationMetrics
impl Unpin for TransformationMetrics
impl UnwindSafe for TransformationMetrics
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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