Skip to main content

SqlitePoolMetrics

Trait SqlitePoolMetrics 

Source
pub trait SqlitePoolMetrics: Send + Sync {
    // Required methods
    fn set_pool_threads(&self, threads: u64);
    fn set_pool_busy(&self, busy: u64);
    fn set_pool_runnable(&self, runnable: u64);
    fn observe_pool_queue_wait(&self, wait_ns: u64);
    fn observe_pool_lock_wait(&self, lock: &'static str, wait_ns: u64);

    // Provided methods
    fn set_page_buffer_capacity_pages(&self, _pages: u64) { ... }
    fn set_page_buffer_pages(&self, _pages: u64) { ... }
    fn set_pager_cache_capacity_bytes(&self, _bytes: u64) { ... }
    fn set_pager_cache_bytes(&self, _bytes: u64) { ... }
    fn set_pager_cache_pages(&self, _pages: u64) { ... }
    fn set_pager_cache_unbudgeted_bytes(&self, _bytes: u64) { ... }
}
Expand description

Process-level pool gauges. Implemented by the runtime that owns the pool.

Required Methods§

Source

fn set_pool_threads(&self, threads: u64)

The configured thread cap.

Source

fn set_pool_busy(&self, busy: u64)

Threads currently running a database action.

Source

fn set_pool_runnable(&self, runnable: u64)

Databases waiting for a thread.

Source

fn observe_pool_queue_wait(&self, wait_ns: u64)

Time a database waited between becoming runnable and a thread taking it.

Source

fn observe_pool_lock_wait(&self, lock: &'static str, wait_ns: u64)

Time a caller waited to take one of the pool’s locks: run_queue or idle.

Provided Methods§

Source

fn set_page_buffer_capacity_pages(&self, _pages: u64)

Configured capacity, in pages, of the process-wide VFS page budget.

Source

fn set_page_buffer_pages(&self, _pages: u64)

Pages the process-wide VFS page budget holds across every database.

Source

fn set_pager_cache_capacity_bytes(&self, _bytes: u64)

Configured byte budget of the process-wide SQLite pager cache.

Source

fn set_pager_cache_bytes(&self, _bytes: u64)

Bytes the process-wide SQLite pager cache holds across every connection.

Source

fn set_pager_cache_pages(&self, _pages: u64)

Pages the process-wide SQLite pager cache holds across every connection.

Source

fn set_pager_cache_unbudgeted_bytes(&self, _bytes: u64)

Bytes of in-memory and temporary database pages the process-wide SQLite pager cache holds outside its budget.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§