pub struct Metrics {
pub ops_started: AtomicU64,
pub ops_completed: AtomicU64,
pub ops_failed: AtomicU64,
pub ops_cancelled: AtomicU64,
pub ops_deadline: AtomicU64,
pub queue_wait_ms_total: AtomicU64,
pub inference_ms_total: AtomicU64,
pub model_loads: AtomicU64,
pub remote_errors: AtomicU64,
pub busy_rejections: AtomicU64,
pub overload_rejections: AtomicU64,
}Expand description
Process-wide metrics sink (also attachable to an engine via Arc).
Fields§
§ops_started: AtomicU64§ops_completed: AtomicU64§ops_failed: AtomicU64§ops_cancelled: AtomicU64§ops_deadline: AtomicU64§queue_wait_ms_total: AtomicU64§inference_ms_total: AtomicU64§model_loads: AtomicU64§remote_errors: AtomicU64§busy_rejections: AtomicU64§overload_rejections: AtomicU64Implementations§
Source§impl Metrics
impl Metrics
pub fn new() -> Self
Process-global shared metrics sink (same instance as process_metrics).
pub fn record_start(&self)
pub fn record_complete(&self, inference: Duration)
pub fn record_failed(&self)
pub fn record_cancelled(&self)
pub fn record_deadline(&self)
pub fn record_model_load(&self)
pub fn record_busy(&self)
pub fn record_overload(&self)
pub fn record_queue_wait(&self, d: Duration)
pub fn snapshot(&self) -> MetricsSnapshot
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Metrics
impl RefUnwindSafe for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnsafeUnpin for Metrics
impl UnwindSafe for Metrics
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> 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 more