Skip to main content

Module metrics

Module metrics 

Source
Expand description

Witness logging and decision audit for the temporal tensor store.

Provides an append-only WitnessLog that records every auditable decision (tier changes, evictions, checksum failures, etc.) and aggregate StoreMetrics for dashboards and alerting.

All types are zero-dependency and allocation-minimal so they can live on the hot path without measurable overhead.

§Usage

use ruvector_temporal_tensor::metrics::{WitnessLog, WitnessEvent, StoreMetrics};

let mut log = WitnessLog::new(1024);
log.record(42, WitnessEvent::Eviction {
    key: BlockKey(7),
    score: 0.1,
    bytes_freed: 4096,
});
assert_eq!(log.count_evictions(), 1);

Structs§

MetricsSeries
Ring buffer of StoreMetrics snapshots for trend analysis.
MetricsTrend
Trend analysis computed from a MetricsSeries.
StoreMetrics
Aggregate metrics for the temporal tensor store.
StoreSnapshot
A point-in-time snapshot of store state for serialization and export.
WitnessLog
Append-only witness log with configurable capacity.
WitnessRecord
A witness record for an auditable decision.

Enums§

StoreHealthStatus
Health status of the store.
TierChangeReason
Reason a block changed tiers.
WitnessEvent
Types of witnessed events.