pub struct ConnectionMemoryStats {
pub page_size_bytes: usize,
pub page_cache: PageCacheMetricsSnapshot,
pub memory_vfs: Option<MemoryVfsUsageSnapshot>,
}Expand description
Point-in-time memory diagnostics for a live connection.
Fields§
§page_size_bytes: usizeDatabase page size used by the active pager backend.
page_cache: PageCacheMetricsSnapshotCurrent page-cache metrics snapshot.
memory_vfs: Option<MemoryVfsUsageSnapshot>MemoryVfs usage snapshot for :memory: databases, when available.
Implementations§
Source§impl ConnectionMemoryStats
impl ConnectionMemoryStats
Sourcepub const fn page_cache_used_bytes(self) -> usize
pub const fn page_cache_used_bytes(self) -> usize
Resident page-cache bytes (cached_pages * page_size_bytes).
Sourcepub const fn page_cache_capacity_bytes(self) -> usize
pub const fn page_cache_capacity_bytes(self) -> usize
Page-cache capacity bytes (pool_capacity * page_size_bytes).
Sourcepub fn estimated_used_bytes(self) -> usize
pub fn estimated_used_bytes(self) -> usize
Estimated currently allocated bytes tracked by FrankenSQLite.
This combines MemoryVfs reserved bytes (actual heap capacity) with the resident page-cache footprint.
Trait Implementations§
Source§impl Clone for ConnectionMemoryStats
impl Clone for ConnectionMemoryStats
Source§fn clone(&self) -> ConnectionMemoryStats
fn clone(&self) -> ConnectionMemoryStats
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 moreSource§impl Debug for ConnectionMemoryStats
impl Debug for ConnectionMemoryStats
Source§impl PartialEq for ConnectionMemoryStats
impl PartialEq for ConnectionMemoryStats
Source§fn eq(&self, other: &ConnectionMemoryStats) -> bool
fn eq(&self, other: &ConnectionMemoryStats) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for ConnectionMemoryStats
impl Eq for ConnectionMemoryStats
impl StructuralPartialEq for ConnectionMemoryStats
Auto Trait Implementations§
impl Freeze for ConnectionMemoryStats
impl RefUnwindSafe for ConnectionMemoryStats
impl Send for ConnectionMemoryStats
impl Sync for ConnectionMemoryStats
impl Unpin for ConnectionMemoryStats
impl UnsafeUnpin for ConnectionMemoryStats
impl UnwindSafe for ConnectionMemoryStats
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).