pub struct CompactionStats {
pub allocated_nodes: u64,
pub live_nodes: u64,
pub reclaimable_nodes: u64,
pub allocated_edges: u64,
pub live_edges: u64,
pub reclaimable_edges: u64,
}Expand description
Cheap snapshot of row-space pressure before compaction.
Deletes clear heavyweight row payloads immediately, but the row slots and stable id mappings remain until compaction. These counters let maintenance policy decide whether a dense rebuild is worth scheduling without first performing that rebuild.
Fields§
§allocated_nodes: u64Allocated node rows, including live rows and reclaimable dead rows.
live_nodes: u64Alive node rows.
reclaimable_nodes: u64Dead node rows that a compaction pass can reclaim.
allocated_edges: u64Allocated edge rows, including live rows and reclaimable dead rows.
live_edges: u64Alive edge rows.
reclaimable_edges: u64Dead edge rows that a compaction pass can reclaim.
Implementations§
Source§impl CompactionStats
impl CompactionStats
Sourcepub fn from_graph(graph: &SeleneGraph) -> Self
pub fn from_graph(graph: &SeleneGraph) -> Self
Build compaction counters for graph without rebuilding any rows.
Sourcepub const fn allocated_rows(self) -> u64
pub const fn allocated_rows(self) -> u64
Total allocated node and edge rows.
Sourcepub const fn reclaimable_rows(self) -> u64
pub const fn reclaimable_rows(self) -> u64
Total reclaimable dead node and edge rows.
Sourcepub fn reclaimable_row_basis_points(self) -> u64
pub fn reclaimable_row_basis_points(self) -> u64
Return reclaimable rows divided by allocated rows, scaled by 10,000.
Sourcepub fn compaction_recommended(self) -> bool
pub fn compaction_recommended(self) -> bool
Return true when current row-space pressure merits maintenance compaction.
The recommendation is diagnostic only: reads and writes never compact automatically, and callers still decide when to run maintenance.
Trait Implementations§
Source§impl Clone for CompactionStats
impl Clone for CompactionStats
Source§fn clone(&self) -> CompactionStats
fn clone(&self) -> CompactionStats
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CompactionStats
Source§impl Debug for CompactionStats
impl Debug for CompactionStats
Source§impl Default for CompactionStats
impl Default for CompactionStats
Source§fn default() -> CompactionStats
fn default() -> CompactionStats
impl Eq for CompactionStats
Source§impl PartialEq for CompactionStats
impl PartialEq for CompactionStats
Source§fn eq(&self, other: &CompactionStats) -> bool
fn eq(&self, other: &CompactionStats) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CompactionStats
Auto Trait Implementations§
impl Freeze for CompactionStats
impl RefUnwindSafe for CompactionStats
impl Send for CompactionStats
impl Sync for CompactionStats
impl Unpin for CompactionStats
impl UnsafeUnpin for CompactionStats
impl UnwindSafe for CompactionStats
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.