pub struct UsageSnapshot {
pub endpoints: HashMap<String, EndpointUsage>,
pub total_cost: f64,
pub total_calls: u64,
pub total_tokens: u64,
}Expand description
Aggregated usage across all endpoints for a test or scenario run.
Fields§
§endpoints: HashMap<String, EndpointUsage>Per-endpoint usage.
total_cost: f64Total cost across all endpoints.
total_calls: u64Total calls across all endpoints.
total_tokens: u64Total tokens across all endpoints.
Implementations§
Source§impl UsageSnapshot
impl UsageSnapshot
Sourcepub fn from_endpoints(endpoints: &HashMap<String, EndpointUsage>) -> Self
pub fn from_endpoints(endpoints: &HashMap<String, EndpointUsage>) -> Self
Creates a snapshot from per-endpoint usage data.
Trait Implementations§
Source§impl Clone for UsageSnapshot
impl Clone for UsageSnapshot
Source§fn clone(&self) -> UsageSnapshot
fn clone(&self) -> UsageSnapshot
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 UsageSnapshot
impl Debug for UsageSnapshot
Source§impl Default for UsageSnapshot
impl Default for UsageSnapshot
Source§fn default() -> UsageSnapshot
fn default() -> UsageSnapshot
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for UsageSnapshot
impl RefUnwindSafe for UsageSnapshot
impl Send for UsageSnapshot
impl Sync for UsageSnapshot
impl Unpin for UsageSnapshot
impl UnsafeUnpin for UsageSnapshot
impl UnwindSafe for UsageSnapshot
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