pub struct WsMetrics {Show 52 fields
pub model_name: String,
pub loaded: bool,
pub state: String,
pub tps: f64,
pub prompt_tps: f64,
pub ctx_used: u32,
pub ctx_max: u32,
pub cpu_usage: f64,
pub gpu_mem_used: u64,
pub gpu_mem_total: u64,
pub ram_used: u64,
pub latency_per_token_ms: f64,
pub decoded_tokens: u64,
pub gen_tps: f64,
pub timestamp: u64,
pub cmd_display: Option<String>,
pub threads: u32,
pub threads_batch: u32,
pub context_length: u32,
pub ubatch_size: u32,
pub batch_size: u32,
pub temperature: f32,
pub top_k: u32,
pub top_p: f32,
pub min_p: f32,
pub typical_p: f32,
pub seed: i32,
pub repeat_penalty: f32,
pub repeat_last_n: i32,
pub presence_penalty: Option<f32>,
pub frequency_penalty: Option<f32>,
pub mirostat: Option<u32>,
pub mirostat_lr: Option<f32>,
pub mirostat_ent: Option<f32>,
pub max_tokens: Option<u32>,
pub flash_attn: bool,
pub kv_cache_offload: bool,
pub cache_type_k: Option<String>,
pub cache_type_v: Option<String>,
pub uniform_cache: bool,
pub mlock: bool,
pub mmap: bool,
pub embedding: bool,
pub jinja: bool,
pub ignore_eos: bool,
pub samplers: String,
pub expert_count: u32,
pub gpu_layers: String,
pub backend: String,
pub llama_cpp_version: String,
pub spec_type: String,
pub draft_tokens: u32,
}Expand description
WebSocket-friendly metrics snapshot (serializable, no internal state).
Fields§
§model_name: String§loaded: bool§state: String§tps: f64§prompt_tps: f64§ctx_used: u32§ctx_max: u32§cpu_usage: f64§gpu_mem_used: u64§gpu_mem_total: u64§ram_used: u64§latency_per_token_ms: f64§decoded_tokens: u64§gen_tps: f64§timestamp: u64§cmd_display: Option<String>§threads: u32§threads_batch: u32§context_length: u32§ubatch_size: u32§batch_size: u32§temperature: f32§top_k: u32§top_p: f32§min_p: f32§typical_p: f32§seed: i32§repeat_penalty: f32§repeat_last_n: i32§presence_penalty: Option<f32>§frequency_penalty: Option<f32>§mirostat: Option<u32>§mirostat_lr: Option<f32>§mirostat_ent: Option<f32>§max_tokens: Option<u32>§flash_attn: bool§kv_cache_offload: bool§cache_type_k: Option<String>§cache_type_v: Option<String>§uniform_cache: bool§mlock: bool§mmap: bool§embedding: bool§jinja: bool§ignore_eos: bool§samplers: String§expert_count: u32§gpu_layers: String§backend: String§llama_cpp_version: String§spec_type: String§draft_tokens: u32Implementations§
Source§impl WsMetrics
impl WsMetrics
pub fn from_metrics( metrics: &ServerMetrics, model_name: &str, state: &str, settings: &ModelSettings, cmd_display: Option<&str>, ) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for WsMetrics
impl<'de> Deserialize<'de> for WsMetrics
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 WsMetrics
impl RefUnwindSafe for WsMetrics
impl Send for WsMetrics
impl Sync for WsMetrics
impl Unpin for WsMetrics
impl UnsafeUnpin for WsMetrics
impl UnwindSafe for WsMetrics
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,
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