Skip to main content

VfsMetrics

Struct VfsMetrics 

Source
pub struct VfsMetrics {
Show 27 fields pub disk_reads: i64, pub disk_writes: i64, pub disk_bytes_read: i64, pub disk_bytes_written: i64, pub blob_reads: i64, pub blob_writes: i64, pub blob_bytes_read: i64, pub blob_bytes_written: i64, pub cache_hits: i64, pub cache_misses: i64, pub cache_miss_pages: i64, pub prefetch_pages: i64, pub lease_acquires: i64, pub lease_renewals: i64, pub lease_releases: i64, pub syncs: i64, pub dirty_pages_synced: i64, pub blob_resizes: i64, pub revalidations: i64, pub revalidation_downloads: i64, pub revalidation_diffs: i64, pub pages_invalidated: i64, pub journal_uploads: i64, pub journal_bytes_uploaded: i64, pub wal_uploads: i64, pub wal_bytes_uploaded: i64, pub azure_errors: i64,
}
Expand description

Per-connection VFS activity counters.

All fields are signed 64-bit integers matching the C sqlite_objs_metrics struct. Counters are zeroed when the database file is opened and can be reset at any time via SQLITE_OBJS_FCNTL_STATS_RESET.

Fields§

§disk_reads: i64

Number of pread calls to the local cache file.

§disk_writes: i64

Number of pwrite calls to the local cache file.

§disk_bytes_read: i64

Total bytes read from the local cache file.

§disk_bytes_written: i64

Total bytes written to the local cache file.

§blob_reads: i64

Number of Azure blob read operations.

§blob_writes: i64

Number of Azure blob write operations.

§blob_bytes_read: i64

Total bytes downloaded from Azure.

§blob_bytes_written: i64

Total bytes uploaded to Azure.

§cache_hits: i64

Page reads satisfied from the local cache.

§cache_misses: i64

Page reads that required a network fetch.

§cache_miss_pages: i64

Individual pages fetched due to cache misses.

§prefetch_pages: i64

Pages loaded during prefetch (full-blob download at open).

§lease_acquires: i64

Number of blob lease acquisitions.

§lease_renewals: i64

Number of blob lease renewals.

§lease_releases: i64

Number of blob lease releases.

§syncs: i64

Number of xSync calls.

§dirty_pages_synced: i64

Dirty pages flushed to Azure during sync.

§blob_resizes: i64

Number of blob resize operations.

§revalidations: i64

Number of ETag revalidation checks.

§revalidation_downloads: i64

Revalidations that required a full re-download.

§revalidation_diffs: i64

Revalidations that applied an incremental diff.

§pages_invalidated: i64

Pages invalidated by revalidation.

§journal_uploads: i64

Number of journal file uploads.

§journal_bytes_uploaded: i64

Total bytes of journal data uploaded.

§wal_uploads: i64

Number of WAL file uploads.

§wal_bytes_uploaded: i64

Total bytes of WAL data uploaded.

§azure_errors: i64

Azure HTTP errors (after retry exhaustion).

Implementations§

Source§

impl VfsMetrics

Source

pub const FIELD_COUNT: usize = 27

The number of counters in the metrics struct.

Source

pub fn parse(text: &str) -> Result<Self, ParseError>

Parse the key=value\n text returned by FCNTL 201 / PRAGMA sqlite_objs_stats.

Unrecognised keys are silently ignored so that older Rust code can read metrics from a newer C library that added counters. Missing keys default to zero.

§Errors

Returns ParseError if a recognised key has a non-integer value.

Trait Implementations§

Source§

impl Clone for VfsMetrics

Source§

fn clone(&self) -> VfsMetrics

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for VfsMetrics

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for VfsMetrics

Source§

fn default() -> VfsMetrics

Returns the “default value” for a type. Read more
Source§

impl PartialEq for VfsMetrics

Source§

fn eq(&self, other: &VfsMetrics) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for VfsMetrics

Source§

impl StructuralPartialEq for VfsMetrics

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.