pub struct DashboardState {
pub metrics: DashboardMetrics,
pub backend_views: Vec<BackendView>,
pub top_users: Vec<DashboardUserStats>,
pub client_history: Vec<ThroughputPoint>,
pub system_stats: SystemStats,
pub view_mode: ViewMode,
pub show_details: bool,
pub log_lines: Vec<String>,
pub buffer_pool: Option<BufferPoolStats>,
}Expand description
Full dashboard state, suitable for rendering locally or over websocket.
Fields§
§metrics: DashboardMetrics§backend_views: Vec<BackendView>§top_users: Vec<DashboardUserStats>§client_history: Vec<ThroughputPoint>§system_stats: SystemStats§view_mode: ViewMode§show_details: bool§log_lines: Vec<String>§buffer_pool: Option<BufferPoolStats>Implementations§
Source§impl DashboardState
impl DashboardState
pub fn latest_client_throughput(&self) -> Option<&ThroughputPoint>
pub fn latest_backend_throughput( &self, backend_idx: usize, ) -> Option<&ThroughputPoint>
pub fn throughput_history( &self, backend_idx: usize, ) -> Option<&[ThroughputPoint]>
pub fn backend_pending_count(&self, backend_idx: usize) -> usize
pub fn backend_load_ratio(&self, backend_idx: usize) -> Option<f64>
pub fn backend_stateful_count(&self, backend_idx: usize) -> usize
pub fn buffer_pool(&self) -> Option<&BufferPoolStats>
Trait Implementations§
Source§impl Clone for DashboardState
impl Clone for DashboardState
Source§fn clone(&self) -> DashboardState
fn clone(&self) -> DashboardState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DashboardState
impl Debug for DashboardState
Source§impl<'de> Deserialize<'de> for DashboardState
impl<'de> Deserialize<'de> for DashboardState
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 DashboardState
impl RefUnwindSafe for DashboardState
impl Send for DashboardState
impl Sync for DashboardState
impl Unpin for DashboardState
impl UnsafeUnpin for DashboardState
impl UnwindSafe for DashboardState
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Code for Twhere
T: Serialize + DeserializeOwned,
impl<T> Code for Twhere
T: Serialize + DeserializeOwned,
Source§fn encode(&self, writer: &mut impl Write) -> Result<(), Error>
fn encode(&self, writer: &mut impl Write) -> Result<(), Error>
Encode the object into a writer. Read more
Source§fn decode(reader: &mut impl Read) -> Result<T, Error>
fn decode(reader: &mut impl Read) -> Result<T, Error>
Decode the object from a reader. Read more
Source§fn estimated_size(&self) -> usize
fn estimated_size(&self) -> usize
Estimated serialized size of the object. Read more
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 more