pub struct StatementCacheStats {
pub hits: u64,
pub misses: u64,
pub entries: usize,
}Expand description
A point-in-time snapshot of a connection’s prepared-statement cache.
Obtained via Client::statement_cache_stats.
Useful for measuring the cache’s effectiveness (the
Config::statement_cache flag is opt-in
precisely so these numbers can be gathered before defaulting it on).
Fields§
§hits: u64Number of lookups that found a cached handle.
misses: u64Number of lookups that missed (triggering an sp_prepare).
entries: usizeNumber of prepared statements currently cached.
Trait Implementations§
Source§impl Clone for StatementCacheStats
impl Clone for StatementCacheStats
Source§fn clone(&self) -> StatementCacheStats
fn clone(&self) -> StatementCacheStats
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StatementCacheStats
Source§impl Debug for StatementCacheStats
impl Debug for StatementCacheStats
impl Eq for StatementCacheStats
Source§impl PartialEq for StatementCacheStats
impl PartialEq for StatementCacheStats
Source§fn eq(&self, other: &StatementCacheStats) -> bool
fn eq(&self, other: &StatementCacheStats) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StatementCacheStats
Auto Trait Implementations§
impl Freeze for StatementCacheStats
impl RefUnwindSafe for StatementCacheStats
impl Send for StatementCacheStats
impl Sync for StatementCacheStats
impl Unpin for StatementCacheStats
impl UnsafeUnpin for StatementCacheStats
impl UnwindSafe for StatementCacheStats
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.