pub struct StoreMetrics {Show 20 fields
pub total_blocks: u64,
pub tier0_blocks: u64,
pub tier1_blocks: u64,
pub tier2_blocks: u64,
pub tier3_blocks: u64,
pub tier1_bytes: u64,
pub tier2_bytes: u64,
pub tier3_bytes: u64,
pub total_reads: u64,
pub total_writes: u64,
pub total_evictions: u64,
pub total_upgrades: u64,
pub total_downgrades: u64,
pub total_reconstructions: u64,
pub total_checksum_failures: u64,
pub total_compactions: u64,
pub tier_flips_last_minute: f32,
pub avg_score_tier1: f32,
pub avg_score_tier2: f32,
pub avg_score_tier3: f32,
}Expand description
Aggregate metrics for the temporal tensor store.
All counters are monotonically increasing over the lifetime of the store.
Gauge-style fields (e.g. tier0_blocks) reflect the current state.
Fields§
§total_blocks: u64Total number of live blocks across all tiers.
tier0_blocks: u64Number of blocks in tier 0 (raw / uncompressed).
tier1_blocks: u64Number of blocks in tier 1 (hot, 8-bit).
tier2_blocks: u64Number of blocks in tier 2 (warm, 7/5-bit).
tier3_blocks: u64Number of blocks in tier 3 (cold, 3-bit).
tier1_bytes: u64Total stored bytes in tier 1.
tier2_bytes: u64Total stored bytes in tier 2.
tier3_bytes: u64Total stored bytes in tier 3.
total_reads: u64Cumulative read count.
total_writes: u64Cumulative write count.
total_evictions: u64Cumulative eviction count.
total_upgrades: u64Cumulative upgrade count.
total_downgrades: u64Cumulative downgrade count.
total_reconstructions: u64Cumulative reconstruction count.
total_checksum_failures: u64Cumulative checksum failure count.
total_compactions: u64Cumulative compaction count.
tier_flips_last_minute: f32Tier flips per block per minute over the last minute.
avg_score_tier1: f32Average score of tier 1 blocks.
avg_score_tier2: f32Average score of tier 2 blocks.
avg_score_tier3: f32Average score of tier 3 blocks.
Implementations§
Source§impl StoreMetrics
impl StoreMetrics
Sourcepub fn compression_ratio(&self) -> f32
pub fn compression_ratio(&self) -> f32
Compression ratio: raw f32 bytes / stored bytes.
Raw bytes are estimated as total_blocks * average_tensor_len * 4, but
since we lack per-block tensor lengths here, we approximate with the
tier-0 identity: each tier-0 block is already f32, so the stored bytes
for tier 0 equal the raw bytes. The ratio is therefore:
(tier0_raw + tier1_raw + tier2_raw + tier3_raw) / total_stored_bytes
Because we don’t track raw bytes per tier at this level, we report
total_stored_bytes / total_stored_bytes as a baseline and let callers
that have richer context compute the true ratio. For a simple heuristic,
we use the known compression ratios: tier1 ~4x, tier2 ~5.5x, tier3 ~10.67x.
Sourcepub fn total_stored_bytes(&self) -> u64
pub fn total_stored_bytes(&self) -> u64
Total stored bytes across all compressed tiers (1, 2, 3).
Tier 0 blocks are raw f32 and not tracked separately; callers can
compute tier-0 bytes as tier0_blocks * tensor_len * 4 if needed.
Sourcepub fn format_report(&self) -> String
pub fn format_report(&self) -> String
Generate a human-readable multi-line status report.
Sourcepub fn format_json(&self) -> String
pub fn format_json(&self) -> String
Generate a JSON representation (no serde dependency).
Sourcepub fn health_check(&self) -> StoreHealthStatus
pub fn health_check(&self) -> StoreHealthStatus
Automated health assessment.
Trait Implementations§
Source§impl Clone for StoreMetrics
impl Clone for StoreMetrics
Source§fn clone(&self) -> StoreMetrics
fn clone(&self) -> StoreMetrics
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more