pub struct UsageSummary {
pub total_tokens: u32,
pub input_tokens: u32,
pub output_tokens: u32,
pub cache_tokens: u32,
pub total_cost_usd: f64,
pub avg_cost_per_token: f64,
pub session_duration: Duration,
pub requests_per_minute: f64,
pub tokens_per_minute: f64,
pub avg_cost_per_request: f64,
}
Expand description
Usage summary for reporting
Fields§
§total_tokens: u32
Total tokens (input + output)
input_tokens: u32
Input tokens
output_tokens: u32
Output tokens
cache_tokens: u32
Cache tokens
total_cost_usd: f64
Total cost
avg_cost_per_token: f64
Average cost per token
session_duration: Duration
Session duration
requests_per_minute: f64
Requests per minute
tokens_per_minute: f64
Tokens per minute
avg_cost_per_request: f64
Cost per request
Trait Implementations§
Source§impl Clone for UsageSummary
impl Clone for UsageSummary
Source§fn clone(&self) -> UsageSummary
fn clone(&self) -> UsageSummary
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 moreSource§impl Debug for UsageSummary
impl Debug for UsageSummary
Source§impl<'de> Deserialize<'de> for UsageSummary
impl<'de> Deserialize<'de> for UsageSummary
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 Display for UsageSummary
impl Display for UsageSummary
Auto Trait Implementations§
impl Freeze for UsageSummary
impl RefUnwindSafe for UsageSummary
impl Send for UsageSummary
impl Sync for UsageSummary
impl Unpin for UsageSummary
impl UnwindSafe for UsageSummary
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.