pub struct Stats {
pub live_documents: usize,
pub file_bytes: u64,
pub live_bytes: u64,
}Available on crate feature
std only.Expand description
A point-in-time summary of a store’s size and contents.
Returned by Db::stats. The gap between file_bytes and live_bytes
(plus framing) is space held by superseded and deleted records — the slack a
future compaction step will reclaim.
§Examples
let db = bison_db::Db::open("data.bison")?;
let stats = db.stats();
println!("{} live documents in {} bytes", stats.live_documents, stats.file_bytes);Fields§
§live_documents: usizeNumber of documents currently readable.
file_bytes: u64Total size of the file on disk, in bytes.
live_bytes: u64Bytes occupied by the bodies of live documents, excluding framing.
Trait Implementations§
impl Copy for Stats
impl Eq for Stats
impl StructuralPartialEq for Stats
Auto Trait Implementations§
impl Freeze for Stats
impl RefUnwindSafe for Stats
impl Send for Stats
impl Sync for Stats
impl Unpin for Stats
impl UnsafeUnpin for Stats
impl UnwindSafe for Stats
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