pub struct IndexTelemetrySnapshot {Show 23 fields
pub namespace: String,
pub source_label: String,
pub started_at: Option<DateTime<Utc>>,
pub total: usize,
pub processed: usize,
pub indexed: usize,
pub skipped: usize,
pub failed: usize,
pub total_chunks: usize,
pub current_item: Option<String>,
pub in_flight: usize,
pub parallelism: usize,
pub paused: bool,
pub stopping: bool,
pub items_per_sec: f64,
pub eta_secs: Option<f64>,
pub elapsed: Duration,
pub avg_embedder_ms: Option<f64>,
pub total_tokens_estimated: usize,
pub complete: bool,
pub stopped_early: bool,
pub fatal_error: Option<String>,
pub recent_warnings: VecDeque<WarningEntry>,
}Expand description
Pull-friendly indexing telemetry snapshot.
The snapshot is the folded-up state of the event stream — anything a
dashboard, status command, or external observer needs to render the
current run without replaying history. Producers fold events into
this struct via IndexTelemetrySnapshot::apply and publish the
updated snapshot however they wish (watch channel, broadcast, JSON
file, etc.).
Fields§
§namespace: String§source_label: String§started_at: Option<DateTime<Utc>>§total: usize§processed: usize§indexed: usize§skipped: usize§failed: usize§total_chunks: usize§current_item: Option<String>§in_flight: usize§parallelism: usize§paused: bool§stopping: bool§items_per_sec: f64§eta_secs: Option<f64>§elapsed: Duration§avg_embedder_ms: Option<f64>§total_tokens_estimated: usize§complete: bool§stopped_early: bool§fatal_error: Option<String>§recent_warnings: VecDeque<WarningEntry>Implementations§
Source§impl IndexTelemetrySnapshot
impl IndexTelemetrySnapshot
Sourcepub fn apply(&mut self, event: &IndexEvent)
pub fn apply(&mut self, event: &IndexEvent)
Fold an event into the running snapshot.
Counters are advanced based on event variant. items_per_sec and
eta_secs are sourced from StatsTick events — the producer is
responsible for measuring rate (see RollingRate) and emitting
ticks; this method does not infer rate from ItemIndexed alone.
Warnings are pushed onto recent_warnings with a hard cap of
MAX_RECENT_WARNINGS — oldest entries are dropped from the
front when capacity is exceeded.
Trait Implementations§
Source§impl Clone for IndexTelemetrySnapshot
impl Clone for IndexTelemetrySnapshot
Source§fn clone(&self) -> IndexTelemetrySnapshot
fn clone(&self) -> IndexTelemetrySnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IndexTelemetrySnapshot
impl Debug for IndexTelemetrySnapshot
Source§impl Default for IndexTelemetrySnapshot
impl Default for IndexTelemetrySnapshot
Source§impl<'de> Deserialize<'de> for IndexTelemetrySnapshot
impl<'de> Deserialize<'de> for IndexTelemetrySnapshot
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>,
Source§impl PartialEq for IndexTelemetrySnapshot
impl PartialEq for IndexTelemetrySnapshot
Source§fn eq(&self, other: &IndexTelemetrySnapshot) -> bool
fn eq(&self, other: &IndexTelemetrySnapshot) -> bool
self and other values to be equal, and is used by ==.