#[non_exhaustive]pub struct WindowStats {
pub max_response_latency_millis: Option<i64>,
pub avg_response_latency_millis: Option<i64>,
pub longest_wait_no_response_millis: Option<i64>,
pub requests_sent_count: Option<i64>,
pub responses_received_count: Option<i64>,
pub bytes_sent_count: Option<i64>,
pub window_start_time_epoch_millis: Option<i64>,
pub window_millis: Option<i64>,
/* private fields */
}Expand description
Aggregate connection metrics over a window interval.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.max_response_latency_millis: Option<i64>Optional. The maximum response latency observed in the window, expressed in milliseconds.
avg_response_latency_millis: Option<i64>Optional. The average response latency observed in the window, expressed in milliseconds.
longest_wait_no_response_millis: Option<i64>Optional. The longest time spent waiting without receiving a response in the window. This could exceed max_response_latency_millis because the latter is evaluated only when a response is received. Expressed in milliseconds.
requests_sent_count: Option<i64>Optional. How many requests were sent in the window.
responses_received_count: Option<i64>Optional. How many responses were received in the window.
bytes_sent_count: Option<i64>Optional. How many bytes were sent in the window.
window_start_time_epoch_millis: Option<i64>Optional. Start time of the window interval for which these stats are aggregated, expressed in epoch milliseconds.
window_millis: Option<i64>Optional. Duration of the window interval for which these stats are aggregated, expressed in milliseconds.
Implementations§
Source§impl WindowStats
impl WindowStats
Sourcepub fn set_max_response_latency_millis<T>(self, v: T) -> Self
pub fn set_max_response_latency_millis<T>(self, v: T) -> Self
Sets the value of max_response_latency_millis.
§Example
let x = WindowStats::new().set_max_response_latency_millis(42);Sourcepub fn set_or_clear_max_response_latency_millis<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_max_response_latency_millis<T>(self, v: Option<T>) -> Self
Sets or clears the value of max_response_latency_millis.
§Example
let x = WindowStats::new().set_or_clear_max_response_latency_millis(Some(42));
let x = WindowStats::new().set_or_clear_max_response_latency_millis(None::<i32>);Sourcepub fn set_avg_response_latency_millis<T>(self, v: T) -> Self
pub fn set_avg_response_latency_millis<T>(self, v: T) -> Self
Sets the value of avg_response_latency_millis.
§Example
let x = WindowStats::new().set_avg_response_latency_millis(42);Sourcepub fn set_or_clear_avg_response_latency_millis<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_avg_response_latency_millis<T>(self, v: Option<T>) -> Self
Sets or clears the value of avg_response_latency_millis.
§Example
let x = WindowStats::new().set_or_clear_avg_response_latency_millis(Some(42));
let x = WindowStats::new().set_or_clear_avg_response_latency_millis(None::<i32>);Sourcepub fn set_longest_wait_no_response_millis<T>(self, v: T) -> Self
pub fn set_longest_wait_no_response_millis<T>(self, v: T) -> Self
Sets the value of longest_wait_no_response_millis.
§Example
let x = WindowStats::new().set_longest_wait_no_response_millis(42);Sourcepub fn set_or_clear_longest_wait_no_response_millis<T>(
self,
v: Option<T>,
) -> Self
pub fn set_or_clear_longest_wait_no_response_millis<T>( self, v: Option<T>, ) -> Self
Sets or clears the value of longest_wait_no_response_millis.
§Example
let x = WindowStats::new().set_or_clear_longest_wait_no_response_millis(Some(42));
let x = WindowStats::new().set_or_clear_longest_wait_no_response_millis(None::<i32>);Sourcepub fn set_requests_sent_count<T>(self, v: T) -> Self
pub fn set_requests_sent_count<T>(self, v: T) -> Self
Sets the value of requests_sent_count.
§Example
let x = WindowStats::new().set_requests_sent_count(42);Sourcepub fn set_or_clear_requests_sent_count<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_requests_sent_count<T>(self, v: Option<T>) -> Self
Sets or clears the value of requests_sent_count.
§Example
let x = WindowStats::new().set_or_clear_requests_sent_count(Some(42));
let x = WindowStats::new().set_or_clear_requests_sent_count(None::<i32>);Sourcepub fn set_responses_received_count<T>(self, v: T) -> Self
pub fn set_responses_received_count<T>(self, v: T) -> Self
Sets the value of responses_received_count.
§Example
let x = WindowStats::new().set_responses_received_count(42);Sourcepub fn set_or_clear_responses_received_count<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_responses_received_count<T>(self, v: Option<T>) -> Self
Sets or clears the value of responses_received_count.
§Example
let x = WindowStats::new().set_or_clear_responses_received_count(Some(42));
let x = WindowStats::new().set_or_clear_responses_received_count(None::<i32>);Sourcepub fn set_bytes_sent_count<T>(self, v: T) -> Self
pub fn set_bytes_sent_count<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_bytes_sent_count<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_bytes_sent_count<T>(self, v: Option<T>) -> Self
Sets or clears the value of bytes_sent_count.
§Example
let x = WindowStats::new().set_or_clear_bytes_sent_count(Some(42));
let x = WindowStats::new().set_or_clear_bytes_sent_count(None::<i32>);Sourcepub fn set_window_start_time_epoch_millis<T>(self, v: T) -> Self
pub fn set_window_start_time_epoch_millis<T>(self, v: T) -> Self
Sets the value of window_start_time_epoch_millis.
§Example
let x = WindowStats::new().set_window_start_time_epoch_millis(42);Sourcepub fn set_or_clear_window_start_time_epoch_millis<T>(
self,
v: Option<T>,
) -> Self
pub fn set_or_clear_window_start_time_epoch_millis<T>( self, v: Option<T>, ) -> Self
Sets or clears the value of window_start_time_epoch_millis.
§Example
let x = WindowStats::new().set_or_clear_window_start_time_epoch_millis(Some(42));
let x = WindowStats::new().set_or_clear_window_start_time_epoch_millis(None::<i32>);Sourcepub fn set_window_millis<T>(self, v: T) -> Self
pub fn set_window_millis<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_window_millis<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_window_millis<T>(self, v: Option<T>) -> Self
Sets or clears the value of window_millis.
§Example
let x = WindowStats::new().set_or_clear_window_millis(Some(42));
let x = WindowStats::new().set_or_clear_window_millis(None::<i32>);Trait Implementations§
Source§impl Clone for WindowStats
impl Clone for WindowStats
Source§impl Debug for WindowStats
impl Debug for WindowStats
Source§impl Default for WindowStats
impl Default for WindowStats
Source§impl Message for WindowStats
impl Message for WindowStats
Source§impl PartialEq for WindowStats
impl PartialEq for WindowStats
impl StructuralPartialEq for WindowStats
Auto Trait Implementations§
impl Freeze for WindowStats
impl RefUnwindSafe for WindowStats
impl Send for WindowStats
impl Sync for WindowStats
impl Unpin for WindowStats
impl UnsafeUnpin for WindowStats
impl UnwindSafe for WindowStats
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<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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> 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