Skip to main content

codetether_rlm/
stats.rs

1//! RLM processing statistics.
2
3use serde::{Deserialize, Serialize};
4
5/// Statistics collected during a single RLM processing run.
6///
7/// Returned inside [`RlmResult`](super::RlmResult) and emitted on the
8/// session bus as part of the
9/// `RlmComplete` event.
10///
11/// # Examples
12///
13/// ```rust
14/// use codetether_rlm::RlmStats;
15///
16/// let s = RlmStats::default();
17/// assert_eq!(s.input_tokens, 0);
18/// assert_eq!(s.iterations, 0);
19/// ```
20#[derive(Debug, Clone, Default, Serialize, Deserialize)]
21pub struct RlmStats {
22    pub input_tokens: usize,
23    pub output_tokens: usize,
24    pub iterations: usize,
25    pub subcalls: usize,
26    pub elapsed_ms: u64,
27    pub compression_ratio: f64,
28}