pub struct CostSnapshot {
pub local_tokens: u64,
pub cloud_tokens: u64,
pub local_requests: u64,
pub cloud_requests: u64,
pub fallback_requests: u64,
pub actual_cost_usd: f64,
pub baseline_cost_usd: f64,
pub savings_usd: f64,
pub savings_percent: f64,
}Expand description
Fields§
§local_tokens: u64Total tokens processed by the local worker.
cloud_tokens: u64Total tokens processed by the cloud worker.
local_requests: u64Number of requests served by the local worker.
cloud_requests: u64Number of requests served by the cloud worker.
fallback_requests: u64Number of fallback requests (local → cloud).
actual_cost_usd: f64Actual total cost in USD.
baseline_cost_usd: f64Hypothetical all-cloud baseline cost in USD.
savings_usd: f64Money saved vs the all-cloud baseline in USD.
savings_percent: f64Savings as a percentage of baseline.
Trait Implementations§
Source§impl Clone for CostSnapshot
impl Clone for CostSnapshot
Source§fn clone(&self) -> CostSnapshot
fn clone(&self) -> CostSnapshot
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 CostSnapshot
impl Debug for CostSnapshot
Source§impl PartialEq for CostSnapshot
impl PartialEq for CostSnapshot
Source§fn eq(&self, other: &CostSnapshot) -> bool
fn eq(&self, other: &CostSnapshot) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CostSnapshot
Auto Trait Implementations§
impl Freeze for CostSnapshot
impl RefUnwindSafe for CostSnapshot
impl Send for CostSnapshot
impl Sync for CostSnapshot
impl Unpin for CostSnapshot
impl UnsafeUnpin for CostSnapshot
impl UnwindSafe for CostSnapshot
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request