pub struct RuntimeMetrics { /* private fields */ }Expand description
Handle for querying runtime-wide metrics.
Cloneable, lightweight handle (only Arc pointers). All counters are monotonic and never reset.
Implementations§
Source§impl RuntimeMetrics
impl RuntimeMetrics
Sourcepub fn boxes_created_total(&self) -> u64
pub fn boxes_created_total(&self) -> u64
Total number of boxes created since runtime startup.
Incremented when BoxliteRuntime::create() is called.
Never decreases (monotonic counter).
Sourcepub fn boxes_failed_total(&self) -> u64
pub fn boxes_failed_total(&self) -> u64
Total number of boxes that failed to start.
Incremented when box creation or initialization fails. Never decreases (monotonic counter).
Sourcepub fn boxes_stopped_total(&self) -> u64
pub fn boxes_stopped_total(&self) -> u64
Total number of boxes that have been stopped.
Incremented when LiteBox::stop() completes successfully.
Never decreases (monotonic counter).
Sourcepub fn num_running_boxes(&self) -> u64
pub fn num_running_boxes(&self) -> u64
Number of currently running boxes.
Calculated as: boxes_created - boxes_stopped - boxes_failed
Sourcepub fn total_commands_executed(&self) -> u64
pub fn total_commands_executed(&self) -> u64
Total commands executed across all boxes.
Incremented on every LiteBox::exec() call.
Never decreases (monotonic counter).
Sourcepub fn total_exec_errors(&self) -> u64
pub fn total_exec_errors(&self) -> u64
Total command execution errors across all boxes.
Incremented when LiteBox::exec() returns error.
Never decreases (monotonic counter).
Trait Implementations§
Source§impl Clone for RuntimeMetrics
impl Clone for RuntimeMetrics
Source§fn clone(&self) -> RuntimeMetrics
fn clone(&self) -> RuntimeMetrics
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for RuntimeMetrics
impl RefUnwindSafe for RuntimeMetrics
impl Send for RuntimeMetrics
impl Sync for RuntimeMetrics
impl Unpin for RuntimeMetrics
impl UnwindSafe for RuntimeMetrics
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
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> 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 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>
T in a tonic::Request