Expand description
Persistent runtime statistics for online cost-model adaptation.
Each query through the optimizer reports a QueryObservation capturing
the family it dispatched to, the wall-clock latency, and the observed
recall (if measurable). QueryStats aggregates these observations into
per-family running averages and produces recommended_weights that the
cost model uses to correct systematic over/underestimates.
Persistence uses serde_json so the file is grep-able for operators;
atomic writes go through a temporary .tmp sibling and a rename.
Structsยง
- Family
Stats - Per-family aggregate running statistics.
- Query
Observation - Single query observation reported back by the dispatcher after execution.
- Query
Stats - Aggregated statistics across all index families.