pub struct LatencyScorer { /* private fields */ }Expand description
Scores agent execution against a latency budget.
Sums latency_ms from LlmResponse events and scores against the budget.
Important: The collector accumulates events across cases. When using
EvalRunner::run with multiple cases, attach the same collector via
EvalRunner::with_event_collector so per-case events are isolated.
When calling EvalRunner::score_result manually, call clear_events
yourself between cases.
Implementations§
Source§impl LatencyScorer
impl LatencyScorer
Sourcepub fn new(collector: EventCollector, max_latency_ms: u64) -> Self
pub fn new(collector: EventCollector, max_latency_ms: u64) -> Self
Create a latency scorer with a default max latency in milliseconds.
The case’s max_latency_ms overrides this default when set.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LatencyScorer
impl RefUnwindSafe for LatencyScorer
impl Send for LatencyScorer
impl Sync for LatencyScorer
impl Unpin for LatencyScorer
impl UnsafeUnpin for LatencyScorer
impl UnwindSafe for LatencyScorer
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