pub struct RealtimeStats {
pub health_error: String,
pub replication_lag_seconds: u32,
pub binlog_players_count: i32,
pub filtered_replication_lag_seconds: i64,
pub cpu_usage: f64,
pub qps: f64,
pub table_schema_changed: Vec<String>,
pub view_schema_changed: Vec<String>,
}Expand description
RealtimeStats contains information about the tablet status. It is only valid for a single tablet.
Fields§
§health_error: Stringhealth_error is the last error we got from health check, or empty is the server is healthy. This is used for subset selection, we do not send queries to servers that are not healthy.
replication_lag_seconds: u32replication_lag_seconds is populated for replicas only. It indicates how far behind on (MySQL) replication a replica currently is. It is used by clients for subset selection (so we don’t try to send traffic to tablets that are too far behind). NOTE: This field must not be evaluated if “health_error” is not empty. TODO(mberlin): Let’s switch it to int64 instead?
binlog_players_count: i32bin_log_players_count is the number of currently running binlog players. if the value is 0, it means that filtered replication is currently not running on the tablet. If >0, filtered replication is running. NOTE: This field must not be evaluated if “health_error” is not empty.
filtered_replication_lag_seconds: i64filtered_replication_lag_seconds is populated for the receiving primary of an ongoing filtered replication only. It specifies how far the receiving primary lags behind the sending primary. NOTE: This field must not be evaluated if “health_error” is not empty. NOTE: This field must not be evaluated if “bin_log_players_count” is 0.
cpu_usage: f64cpu_usage is used for load-based balancing
qps: f64qps is the average QPS (queries per second) rate in the last XX seconds where XX is usually 60 (See query_service_stats.go).
table_schema_changed: Vec<String>table_schema_changed is to provide list of tables that have schema changes detected by the tablet.
view_schema_changed: Vec<String>view_schema_changed is to provide list of views that have schema changes detected by the tablet.
Trait Implementations§
Source§impl Clone for RealtimeStats
impl Clone for RealtimeStats
Source§fn clone(&self) -> RealtimeStats
fn clone(&self) -> RealtimeStats
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RealtimeStats
impl Debug for RealtimeStats
Source§impl Default for RealtimeStats
impl Default for RealtimeStats
Source§impl Message for RealtimeStats
impl Message for RealtimeStats
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self.Source§impl PartialEq for RealtimeStats
impl PartialEq for RealtimeStats
impl StructuralPartialEq for RealtimeStats
Auto Trait Implementations§
impl Freeze for RealtimeStats
impl RefUnwindSafe for RealtimeStats
impl Send for RealtimeStats
impl Sync for RealtimeStats
impl Unpin for RealtimeStats
impl UnwindSafe for RealtimeStats
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> 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