pub struct RoutingStats {Show 13 fields
pub total_queries: AtomicU64,
pub schema_aware_routes: AtomicU64,
pub fallback_routes: AtomicU64,
pub shard_targeted: AtomicU64,
pub scatter_gather: AtomicU64,
pub primary_routes: AtomicU64,
pub replica_routes: AtomicU64,
pub ai_routes: AtomicU64,
pub rag_routes: AtomicU64,
pub vector_routes: AtomicU64,
pub classification_hits: AtomicU64,
pub classification_misses: AtomicU64,
pub routing_errors: AtomicU64,
}Expand description
Overall routing statistics
Fields§
§total_queries: AtomicU64Total queries routed
schema_aware_routes: AtomicU64Schema-aware routing decisions
fallback_routes: AtomicU64Fallback routing decisions
shard_targeted: AtomicU64Shard-targeted queries
scatter_gather: AtomicU64Scatter-gather queries
primary_routes: AtomicU64Primary routes
replica_routes: AtomicU64Replica routes
ai_routes: AtomicU64AI workload routes
rag_routes: AtomicU64RAG pipeline routes
vector_routes: AtomicU64Vector search routes
classification_hits: AtomicU64Classification cache hits
classification_misses: AtomicU64Classification cache misses
routing_errors: AtomicU64Routing errors
Implementations§
Source§impl RoutingStats
impl RoutingStats
Sourcepub fn total_queries(&self) -> u64
pub fn total_queries(&self) -> u64
Get total queries count
Sourcepub fn schema_aware_percentage(&self) -> f64
pub fn schema_aware_percentage(&self) -> f64
Get schema-aware routing percentage
Sourcepub fn classification_hit_rate(&self) -> f64
pub fn classification_hit_rate(&self) -> f64
Get classification cache hit rate
Sourcepub fn primary_replica_ratio(&self) -> f64
pub fn primary_replica_ratio(&self) -> f64
Get primary/replica distribution
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RoutingStats
impl RefUnwindSafe for RoutingStats
impl Send for RoutingStats
impl Sync for RoutingStats
impl Unpin for RoutingStats
impl UnsafeUnpin for RoutingStats
impl UnwindSafe for RoutingStats
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
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