pub struct CircuitBreakerStats {
pub status: CircuitStatus,
pub failures: usize,
pub successes: usize,
pub success_rate: f64,
pub time_in_current_state: Duration,
pub probe_failures: usize,
}Expand description
A point-in-time snapshot of CircuitBreaker metrics.
Obtain via CircuitBreaker::stats.
Fields§
§status: CircuitStatusCurrent state of the circuit breaker.
failures: usizeTotal failures recorded in the current window.
successes: usizeTotal successes recorded in the current window.
success_rate: f64Fraction of recent requests that succeeded (0.0 - 1.0).
time_in_current_state: DurationWall-clock time spent in the current state.
probe_failures: usizeConsecutive half-open probe failures. The next probe interval is
timeout * 2^min(probe_failures, 6). Zero when the circuit is
closed or has not yet attempted any half-open probes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CircuitBreakerStats
impl RefUnwindSafe for CircuitBreakerStats
impl Send for CircuitBreakerStats
impl Sync for CircuitBreakerStats
impl Unpin for CircuitBreakerStats
impl UnsafeUnpin for CircuitBreakerStats
impl UnwindSafe for CircuitBreakerStats
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
§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