Struct kvdb_rocksdb::CompactionProfile
source · pub struct CompactionProfile {
pub initial_file_size: u64,
pub block_size: usize,
}
Expand description
Compaction profile for the database settings Note, that changing these parameters may trigger the compaction process of RocksDB on startup. https://github.com/facebook/rocksdb/wiki/Leveled-Compaction#level_compaction_dynamic_level_bytes-is-true
Fields§
§initial_file_size: u64
L0-L1 target file size The minimum size should be calculated in accordance with the number of levels and the expected size of the database.
block_size: usize
block size
Implementations§
source§impl CompactionProfile
impl CompactionProfile
sourcepub fn auto<P: AsRef<Path>>(_db_path: P) -> CompactionProfile
pub fn auto<P: AsRef<Path>>(_db_path: P) -> CompactionProfile
Just default for other platforms.
sourcepub fn ssd() -> CompactionProfile
pub fn ssd() -> CompactionProfile
Default profile suitable for SSD storage
sourcepub fn hdd() -> CompactionProfile
pub fn hdd() -> CompactionProfile
Slow HDD compaction profile
Trait Implementations§
source§impl Clone for CompactionProfile
impl Clone for CompactionProfile
source§fn clone(&self) -> CompactionProfile
fn clone(&self) -> CompactionProfile
Returns a copy 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 CompactionProfile
impl Debug for CompactionProfile
source§impl Default for CompactionProfile
impl Default for CompactionProfile
source§fn default() -> CompactionProfile
fn default() -> CompactionProfile
Default profile suitable for most storage
source§impl PartialEq<CompactionProfile> for CompactionProfile
impl PartialEq<CompactionProfile> for CompactionProfile
source§fn eq(&self, other: &CompactionProfile) -> bool
fn eq(&self, other: &CompactionProfile) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for CompactionProfile
impl StructuralPartialEq for CompactionProfile
Auto Trait Implementations§
impl RefUnwindSafe for CompactionProfile
impl Send for CompactionProfile
impl Sync for CompactionProfile
impl Unpin for CompactionProfile
impl UnwindSafe for CompactionProfile
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