pub struct CostModel {
pub split_cost: i64,
pub compression_percent: i64,
pub min_split_items: i64,
pub runt_patience: u32,
}Expand description
The two constants the SectionPolicy::Cost model is built from, exposed
so they can be swept rather than argued about.
Fields§
§split_cost: i64Bytes a split costs. 64 by default: a fresh section header, a fresh R-tree leaf and the framing of a fresh zlib stream.
compression_percent: i64Percentage of a widening that survives deflate. 25 by default: the columns a wider encoding adds are near-constant-stride coordinates, of which deflate keeps very little.
min_split_items: i64Fewest items a section must hold to count as worth writing. Below this
SectionPolicy::Runt will not close a section, and
SectionPolicy::Adaptive counts one against its patience.
runt_patience: u32How many too-short sections in a row SectionPolicy::Adaptive writes
before it concludes that splitting is not working here.
Trait Implementations§
impl Copy for CostModel
impl Eq for CostModel
impl StructuralPartialEq for CostModel
Auto Trait Implementations§
impl Freeze for CostModel
impl RefUnwindSafe for CostModel
impl Send for CostModel
impl Sync for CostModel
impl Unpin for CostModel
impl UnsafeUnpin for CostModel
impl UnwindSafe for CostModel
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more