pub struct RuntimeMetrics {
pub cpu_percent: f64,
pub memory_rss_bytes: u64,
pub memory_total_bytes: u64,
pub memory_percent: f64,
pub active_connections: usize,
pub uptime_seconds: u64,
pub qps_window_60s: f64,
pub error_rate_5xx_60s: f64,
pub throughput_by_route: Vec<RouteStats>,
pub wal: WalSnapshot,
}Expand description
Runtime metrics snapshot returned by GET /metrics/runtime
(phase25). Single JSON object refreshed once per second on the
server. Every field defaults so the SDK tolerates older servers
that do not emit the route.
Fields§
§cpu_percent: f64CPU usage of the server process, 0–100 %.
memory_rss_bytes: u64Resident-set size of the server process in bytes.
memory_total_bytes: u64Total physical memory of the host in bytes.
memory_percent: f64RSS as a fraction of total memory, 0–100 %.
active_connections: usizeActive HTTP connections at the moment of sampling.
uptime_seconds: u64Seconds since the server process started.
qps_window_60s: f64Rolling 60-second queries-per-second across all routes.
error_rate_5xx_60s: f64Fraction of requests in the last 60 s with HTTP 5xx status, 0–1.
throughput_by_route: Vec<RouteStats>Per-route latency / throughput. Sorted descending by QPS.
wal: WalSnapshotWAL state. Zero-initialised on standalone servers without replication.
Trait Implementations§
Source§impl Clone for RuntimeMetrics
impl Clone for RuntimeMetrics
Source§fn clone(&self) -> RuntimeMetrics
fn clone(&self) -> RuntimeMetrics
Returns a duplicate of the value. Read more
1.0.0 · 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 RuntimeMetrics
impl Debug for RuntimeMetrics
Source§impl Default for RuntimeMetrics
impl Default for RuntimeMetrics
Source§fn default() -> RuntimeMetrics
fn default() -> RuntimeMetrics
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RuntimeMetrics
impl<'de> Deserialize<'de> for RuntimeMetrics
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 RuntimeMetrics
impl RefUnwindSafe for RuntimeMetrics
impl Send for RuntimeMetrics
impl Sync for RuntimeMetrics
impl Unpin for RuntimeMetrics
impl UnsafeUnpin 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
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> 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>
Wrap the input message
T in a tonic::Request