pub struct RepackPolicy {
pub loose_object_threshold: Option<u64>,
pub pack_count_threshold: Option<u64>,
pub pack_bytes_threshold: Option<u64>,
pub fragmentation_threshold_bps: Option<u16>,
}Expand description
Configurable automatic repack thresholds.
None disables a signal. Size only triggers when at least two packs exist:
rewriting one already-consolidated large pack would otherwise thrash forever.
Fields§
§loose_object_threshold: Option<u64>Trigger after this many loose objects.
pack_count_threshold: Option<u64>Trigger after this many active packs.
pack_bytes_threshold: Option<u64>Trigger when two or more packs occupy at least this many bytes.
fragmentation_threshold_bps: Option<u16>Trigger at this duplicate-entry ratio in basis points.
Implementations§
Source§impl RepackPolicy
impl RepackPolicy
Sourcepub fn evaluate(self, inventory: RepackInventory) -> Option<RepackReason>
pub fn evaluate(self, inventory: RepackInventory) -> Option<RepackReason>
Return the first policy signal crossed by inventory.
Trait Implementations§
Source§impl Clone for RepackPolicy
impl Clone for RepackPolicy
Source§fn clone(&self) -> RepackPolicy
fn clone(&self) -> RepackPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RepackPolicy
Source§impl Debug for RepackPolicy
impl Debug for RepackPolicy
Source§impl Default for RepackPolicy
impl Default for RepackPolicy
Source§fn default() -> RepackPolicy
fn default() -> RepackPolicy
Returns the “default value” for a type. Read more
impl Eq for RepackPolicy
Source§impl PartialEq for RepackPolicy
impl PartialEq for RepackPolicy
impl StructuralPartialEq for RepackPolicy
Auto Trait Implementations§
impl Freeze for RepackPolicy
impl RefUnwindSafe for RepackPolicy
impl Send for RepackPolicy
impl Sync for RepackPolicy
impl Unpin for RepackPolicy
impl UnsafeUnpin for RepackPolicy
impl UnwindSafe for RepackPolicy
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