pub enum TraceMetricSpec {
EventCount {
event_type: String,
min: Option<u64>,
max: Option<u64>,
},
ToolCallCount {
tool: Option<String>,
min: Option<u64>,
max: Option<u64>,
},
ToolErrorRate {
max: Option<f64>,
},
TurnCount {
min: Option<u64>,
max: Option<u64>,
},
LatencyMs {
max: Option<u64>,
},
TokenCostMicros {
max: Option<u64>,
},
RetryCount {
max: Option<u64>,
},
LoopDetected {
max_repeats: u64,
},
EventSequence {
event_types: Vec<String>,
},
}Expand description
Deterministic metric computed from the case’s trace (plus evidence).
Bounds are inclusive. A metric with neither bound set is observational: it records a value without ever failing, which is a legitimate way to collect a signal before deciding what “good” means.
Variants§
EventCount
ToolCallCount
ToolErrorRate
TurnCount
LatencyMs
TokenCostMicros
RetryCount
LoopDetected
Same (tool, argsDigest) repeated more than max_repeats in a row.
EventSequence
Listed event types must appear in this relative order.
Implementations§
Trait Implementations§
Source§impl Clone for TraceMetricSpec
impl Clone for TraceMetricSpec
Source§fn clone(&self) -> TraceMetricSpec
fn clone(&self) -> TraceMetricSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TraceMetricSpec
impl Debug for TraceMetricSpec
Source§impl<'de> Deserialize<'de> for TraceMetricSpec
impl<'de> Deserialize<'de> for TraceMetricSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TraceMetricSpec
impl PartialEq for TraceMetricSpec
Source§impl Serialize for TraceMetricSpec
impl Serialize for TraceMetricSpec
impl StructuralPartialEq for TraceMetricSpec
Auto Trait Implementations§
impl Freeze for TraceMetricSpec
impl RefUnwindSafe for TraceMetricSpec
impl Send for TraceMetricSpec
impl Sync for TraceMetricSpec
impl Unpin for TraceMetricSpec
impl UnsafeUnpin for TraceMetricSpec
impl UnwindSafe for TraceMetricSpec
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