Merge commit 'd803bfe2b1fe7f5e219e50ac20d6801a0a58ac75' as 'vendor/ruvector'

This commit is contained in:
ruv
2026-02-28 14:39:40 -05:00
7854 changed files with 3522914 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
//! Store status reporting.
/// Compaction state as reported in store status.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CompactionState {
/// No compaction in progress.
Idle,
/// Normal compaction running.
Running,
/// Emergency compaction (dead_space > 70%).
Emergency,
}
/// A snapshot of the store's current state.
#[derive(Clone, Debug)]
pub struct StoreStatus {
/// Total number of live (non-deleted) vectors.
pub total_vectors: u64,
/// Total number of segments in the file.
pub total_segments: u32,
/// Total file size in bytes.
pub file_size: u64,
/// Current manifest epoch.
pub current_epoch: u32,
/// Hardware profile identifier.
pub profile_id: u8,
/// Current compaction state.
pub compaction_state: CompactionState,
/// Ratio of dead space to total file size (0.0 - 1.0).
pub dead_space_ratio: f64,
/// Whether the store is open in read-only mode.
pub read_only: bool,
}