pub struct DatabaseStats {
pub total_schemas: usize,
pub total_domains: usize,
pub total_predicates: usize,
pub size_bytes: Option<usize>,
}Expand description
Statistics about database storage.
Fields§
§total_schemas: usizeTotal number of stored schemas
total_domains: usizeTotal number of domains across all schemas
total_predicates: usizeTotal number of predicates across all schemas
size_bytes: Option<usize>Total database size in bytes (if applicable)
Implementations§
Source§impl DatabaseStats
impl DatabaseStats
Sourcepub fn from_database<D: SchemaDatabase>(db: &D) -> Result<Self, AdapterError>
pub fn from_database<D: SchemaDatabase>(db: &D) -> Result<Self, AdapterError>
Calculate statistics from a database implementation.
Sourcepub fn avg_domains_per_schema(&self) -> f64
pub fn avg_domains_per_schema(&self) -> f64
Calculate average domains per schema.
Sourcepub fn avg_predicates_per_schema(&self) -> f64
pub fn avg_predicates_per_schema(&self) -> f64
Calculate average predicates per schema.
Trait Implementations§
Source§impl Clone for DatabaseStats
impl Clone for DatabaseStats
Source§fn clone(&self) -> DatabaseStats
fn clone(&self) -> DatabaseStats
Returns a duplicate of the value. Read more
1.0.0 · 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 DatabaseStats
impl Debug for DatabaseStats
Auto Trait Implementations§
impl Freeze for DatabaseStats
impl RefUnwindSafe for DatabaseStats
impl Send for DatabaseStats
impl Sync for DatabaseStats
impl Unpin for DatabaseStats
impl UnwindSafe for DatabaseStats
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