Skip to main content

EvaluationProgressLogger

Trait EvaluationProgressLogger 

pub trait EvaluationProgressLogger: Send {
    // Required methods
    fn start_global_progress(&mut self, total_tests: usize);
    fn start_test(&mut self, name: &str, total_items: usize);
    fn update_test_progress(&mut self, items_processed: usize);
    fn end_test(&mut self);
    fn end_global_progress(&mut self);
    fn log_event_evaluation(&mut self, event: String);
}
Expand description

Trait for logging evaluation progress at each step and end of evaluation.

§Call sequence

Implementors can expect the following sequence of calls for a complete evaluation run:

start_global_progress(total_tests)
  for each test split:
    start_test(name, total_items)
      update_test_progress(items_processed)  // called once per batch
      ...
    end_test()
end_global_progress()

end_global_progress() is called whether evaluation completes normally or is interrupted early.

Implementors are responsible for tracking total_tests and total_items (stored from start_global_progress and start_test) to reconstruct the full progress picture.

Required Methods§

fn start_global_progress(&mut self, total_tests: usize)

Called once at the start of evaluation, providing the total number of test splits.

fn start_test(&mut self, name: &str, total_items: usize)

Called at the start of a test split, providing the split name and total number of items.

fn update_test_progress(&mut self, items_processed: usize)

Log the progress of the current test step.

fn end_test(&mut self)

Called at the end of a test split.

fn end_global_progress(&mut self)

Called at the end of evaluation.

fn log_event_evaluation(&mut self, event: String)

Log a custom named event that falls outside the standard evaluation lifecycle callbacks.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§