rvf_runtime/status.rs
1//! Store status reporting.
2
3/// Compaction state as reported in store status.
4#[derive(Clone, Copy, Debug, PartialEq, Eq)]
5pub enum CompactionState {
6 /// No compaction in progress.
7 Idle,
8 /// Normal compaction running.
9 Running,
10 /// Emergency compaction (dead_space > 70%).
11 Emergency,
12}
13
14/// A snapshot of the store's current state.
15#[derive(Clone, Debug)]
16pub struct StoreStatus {
17 /// Total number of live (non-deleted) vectors.
18 pub total_vectors: u64,
19 /// Total number of segments in the file.
20 pub total_segments: u32,
21 /// Total file size in bytes.
22 pub file_size: u64,
23 /// Current manifest epoch.
24 pub current_epoch: u32,
25 /// Hardware profile identifier.
26 pub profile_id: u8,
27 /// Current compaction state.
28 pub compaction_state: CompactionState,
29 /// Ratio of dead space to total file size (0.0 - 1.0).
30 pub dead_space_ratio: f64,
31 /// Whether the store is open in read-only mode.
32 pub read_only: bool,
33}