pub struct ModelStats {
pub inference_count: u64,
pub total_inference_time_ms: f64,
pub last_inference_time: Option<SystemTime>,
pub average_inference_time_ms: f64,
pub error_count: u64,
pub success_count: u64,
pub min_inference_time_ms: Option<f64>,
pub max_inference_time_ms: Option<f64>,
pub batch_count: u64,
pub batched_items: u64,
}Expand description
A model’s request counters, as /metrics reports them.
Counts are per request; timings are per forward pass, so requests batched together each record the time of the pass they shared.
Fields§
§inference_count: u64Requests answered, successfully or not
total_inference_time_ms: f64Sum of the forward-pass times recorded for successful requests
last_inference_time: Option<SystemTime>When the last successful request finished; RFC 3339 in JSON
average_inference_time_ms: f64total_inference_time_ms / success_count
error_count: u64Requests that failed, whether their inputs were invalid or the model failed
success_count: u64Requests that got their outputs
min_inference_time_ms: Option<f64>Fastest forward pass a successful request was part of
max_inference_time_ms: Option<f64>Slowest forward pass a successful request was part of
batch_count: u64Forward passes run. Below success_count when requests were batched together
batched_items: u64Items processed by those forward passes
Trait Implementations§
Source§impl Clone for ModelStats
impl Clone for ModelStats
Source§impl Debug for ModelStats
impl Debug for ModelStats
Source§impl<'de> Deserialize<'de> for ModelStats
impl<'de> Deserialize<'de> for ModelStats
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
Auto Trait Implementations§
impl Freeze for ModelStats
impl RefUnwindSafe for ModelStats
impl Send for ModelStats
impl Sync for ModelStats
impl Unpin for ModelStats
impl UnsafeUnpin for ModelStats
impl UnwindSafe for ModelStats
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> 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> ⓘ
Converts
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> ⓘ
Converts
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 moreSource§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