struct Total {Show 17 fields
consumer: String,
operation: String,
host: String,
model: String,
calls: u64,
attempts: u64,
status: BTreeMap<String, u64>,
input_tokens: u64,
output_tokens: u64,
cached_input_tokens: u64,
reasoning_tokens: u64,
unreported: u64,
latencies: Vec<u64>,
latency_samples: u64,
latency_p50_ms: Option<u64>,
latency_p95_ms: Option<u64>,
latency_max_ms: Option<u64>,
}Expand description
Requests and reported tokens of one consumer/operation/host/model group.
Fields§
§consumer: StringComponent that made the requests.
operation: StringWhat the component used the model for.
host: StringEndpoint host and port; joined with model against a price list.
model: StringModel named in the requests.
calls: u64Records in the group, one per call.
attempts: u64Requests sent, retries included.
status: BTreeMap<String, u64>Calls per outcome (ok, http_error, …).
input_tokens: u64Sum of reported prompt tokens.
output_tokens: u64Sum of reported generated tokens.
cached_input_tokens: u64Sum of reported cached prompt tokens.
reasoning_tokens: u64Sum of reported reasoning tokens.
unreported: u64Calls whose input or output count was not reported; their tokens are missing from the sums.
latencies: Vec<u64>Reported latencies, kept only to compute the summary below.
latency_samples: u64Calls that reported a latency.
latency_p50_ms: Option<u64>Median reported latency in milliseconds.
latency_p95_ms: Option<u64>95th percentile reported latency in milliseconds.
latency_max_ms: Option<u64>Maximum reported latency in milliseconds.
Implementations§
Source§impl Total
impl Total
Sourcefn summarize_latency(&mut self)
fn summarize_latency(&mut self)
Sort once, then fill the latency summary fields.
Trait Implementations§
impl Eq for Total
impl StructuralPartialEq for Total
Auto Trait Implementations§
impl Freeze for Total
impl RefUnwindSafe for Total
impl Send for Total
impl Sync for Total
impl Unpin for Total
impl UnsafeUnpin for Total
impl UnwindSafe for Total
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].