pub struct StatisticsReader { /* private fields */ }Expand description
High-level Statistics.db file reader
Implementations§
Source§impl StatisticsReader
impl StatisticsReader
Sourcepub async fn open(path: &Path, platform: Arc<Platform>) -> Result<Self>
pub async fn open(path: &Path, platform: Arc<Platform>) -> Result<Self>
Open and parse a Statistics.db file
Sourcepub fn statistics(&self) -> &SSTableStatistics
pub fn statistics(&self) -> &SSTableStatistics
Get the raw statistics data
Sourcepub fn analyze(&self) -> StatisticsSummary
pub fn analyze(&self) -> StatisticsSummary
Get a human-readable summary analysis
Sourcepub async fn validate_checksum(&self) -> Result<bool>
pub async fn validate_checksum(&self) -> Result<bool>
Validate checksum for parsed statistics
Sourcepub fn matches_table(&self, table_id: &[u8; 16]) -> bool
pub fn matches_table(&self, table_id: &[u8; 16]) -> bool
Check if the Statistics.db corresponds to a specific table
Sourcepub fn live_row_count(&self) -> u64
pub fn live_row_count(&self) -> u64
Get live row count (excluding tombstones)
Sourcepub fn timestamp_range(&self) -> (i64, i64)
pub fn timestamp_range(&self) -> (i64, i64)
Get timestamp range in microseconds as (min, max).
Note (#1729): the returned max may be the i64::MIN “unavailable”
sentinel when the enhanced (nb) parser could not authoritatively decode
maxTimestamp from STATS. Callers that need a guaranteed-real maximum
should use Self::max_timestamp, which returns None for that case.
Sourcepub fn max_timestamp(&self) -> Option<i64>
pub fn max_timestamp(&self) -> Option<i64>
Get the authoritative SSTable maxTimestamp (microseconds), or None
when it is not available (#1729 fail-closed sentinel i64::MIN).
Consumers that must not proceed without a real maximum (e.g. a
compaction drop/GC gate, #1388) should gate on this returning Some.
Sourcepub fn compression_info(&self) -> (&str, f64)
pub fn compression_info(&self) -> (&str, f64)
Get compression information
Sourcepub fn partition_info(&self) -> (u64, f64, u64)
pub fn partition_info(&self) -> (u64, f64, u64)
Get partition statistics
Sourcepub fn column_stats(&self, column_name: &str) -> Option<&ColumnStatistics>
pub fn column_stats(&self, column_name: &str) -> Option<&ColumnStatistics>
Get column statistics by name
Sourcepub fn column_names(&self) -> Vec<&str>
pub fn column_names(&self) -> Vec<&str>
Get all column names with statistics
Sourcepub fn has_ttl_data(&self) -> bool
pub fn has_ttl_data(&self) -> bool
Check if data has TTL information
Sourcepub fn disk_usage(&self) -> (u64, u64, f64)
pub fn disk_usage(&self) -> (u64, u64, f64)
Get disk space usage information
Sourcepub fn generate_report(&self, include_column_details: bool) -> String
pub fn generate_report(&self, include_column_details: bool) -> String
Generate a detailed report
Sourcepub fn compact_summary(&self) -> String
pub fn compact_summary(&self) -> String
Get a compact summary for CLI display