pub struct ServerMetrics {Show 14 fields
pub loaded: bool,
pub tps: f64,
pub prompt_tps: f64,
pub cpu_usage: f64,
pub gpu_mem_used: u64,
pub gpu_mem_total: u64,
pub ram_used: u64,
pub ctx_used: u32,
pub ctx_max: u32,
pub total_vram_used: u64,
pub decoded_tokens: u64,
pub gen_tps: f64,
pub latency_per_token_ms: f64,
pub prompt_latency_ms: f64,
}Expand description
Metrics reported by the llama.cpp server.
Fields§
§loaded: bool§tps: f64§prompt_tps: f64§cpu_usage: f64§gpu_mem_used: u64§gpu_mem_total: u64§ram_used: u64§ctx_used: u32§ctx_max: u32§total_vram_used: u64Sum of gpu_mem_used across all loaded models (for Total VRAM display).
decoded_tokens: u64Number of decoded tokens from print_timing logs.
gen_tps: f64Generation tokens per second parsed from llama.cpp log output (e.g., “tg = 64.45 t/s”).
latency_per_token_ms: f64Estimated latency per generated token in milliseconds.
prompt_latency_ms: f64Estimated prompt processing latency in milliseconds (1000 / prompt_tps).
Trait Implementations§
Source§impl Clone for ServerMetrics
impl Clone for ServerMetrics
Source§fn clone(&self) -> ServerMetrics
fn clone(&self) -> ServerMetrics
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 ServerMetrics
impl Debug for ServerMetrics
Auto Trait Implementations§
impl Freeze for ServerMetrics
impl RefUnwindSafe for ServerMetrics
impl Send for ServerMetrics
impl Sync for ServerMetrics
impl Unpin for ServerMetrics
impl UnsafeUnpin for ServerMetrics
impl UnwindSafe for ServerMetrics
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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> 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