pub struct SessionStats {
pub document_count: Cell<usize>,
pub query_count: Cell<usize>,
pub cache_hits: Cell<usize>,
pub cache_misses: Cell<usize>,
/* private fields */
}Expand description
Session statistics.
Fields§
§document_count: Cell<usize>Total documents in session.
query_count: Cell<usize>Total queries made.
cache_hits: Cell<usize>Cache hits.
cache_misses: Cell<usize>Cache misses.
Implementations§
Source§impl SessionStats
impl SessionStats
Sourcepub fn cache_hit_rate(&self) -> f32
pub fn cache_hit_rate(&self) -> f32
Get the cache hit rate.
Sourcepub fn total_query_time(&self) -> Duration
pub fn total_query_time(&self) -> Duration
Get the total query time.
Sourcepub fn avg_query_time(&self) -> Option<Duration>
pub fn avg_query_time(&self) -> Option<Duration>
Get the average query time.
Trait Implementations§
Source§impl Clone for SessionStats
impl Clone for SessionStats
Source§impl Debug for SessionStats
impl Debug for SessionStats
Source§impl Default for SessionStats
impl Default for SessionStats
Source§fn default() -> SessionStats
fn default() -> SessionStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for SessionStats
impl !RefUnwindSafe for SessionStats
impl Send for SessionStats
impl !Sync for SessionStats
impl Unpin for SessionStats
impl UnsafeUnpin for SessionStats
impl UnwindSafe for SessionStats
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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