pub struct RecentRequest {
pub request_id: String,
pub at_ms: u64,
pub route: String,
pub status: u16,
pub prompt_tokens: usize,
pub completion_tokens: usize,
pub ttft_ms: Option<f64>,
pub duration_ms: u64,
pub decode_ms: Option<f64>,
pub stream: bool,
}Expand description
One finished request, as recorded in the ring buffer.
duration_ms and decode_ms are separate on purpose and must stay
that way: duration_ms carries queue wait plus prefill plus decode,
so dividing completion tokens by it reports a 50 tok/s model as 5
whenever the prompt is long. Everything downstream of that number is
then wrong in the same direction.
Fields§
§request_id: StringThe same id the response carried, so a UI can join a log line to the message it produced without a claiming heuristic.
at_ms: u64Unix epoch milliseconds when the request finished.
route: String§status: u16§prompt_tokens: usize§completion_tokens: usize§ttft_ms: Option<f64>§duration_ms: u64Total server-side wall time for the request.
decode_ms: Option<f64>Time inside the decode loop only. null when the engine did not
time itself, or the answer came from cache.
stream: boolTrait Implementations§
Source§impl Clone for RecentRequest
impl Clone for RecentRequest
Source§fn clone(&self) -> RecentRequest
fn clone(&self) -> RecentRequest
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 RecentRequest
impl Debug for RecentRequest
Source§impl<'de> Deserialize<'de> for RecentRequest
impl<'de> Deserialize<'de> for RecentRequest
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
Source§impl PartialEq for RecentRequest
impl PartialEq for RecentRequest
Source§impl Serialize for RecentRequest
impl Serialize for RecentRequest
impl StructuralPartialEq for RecentRequest
Auto Trait Implementations§
impl Freeze for RecentRequest
impl RefUnwindSafe for RecentRequest
impl Send for RecentRequest
impl Sync for RecentRequest
impl Unpin for RecentRequest
impl UnsafeUnpin for RecentRequest
impl UnwindSafe for RecentRequest
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