Expand description
Resize SLA monitoring with conformal alerting (bd-1rz0.21).
This module provides SLA monitoring for resize operations by integrating
the ConformalAlert system with resize telemetry hooks.
§Mathematical Model
The SLA monitor tracks resize latency (time from resize event to final frame apply) and uses conformal prediction to detect violations:
SLA violation := latency > conformal_threshold(calibration_data, alpha)The conformal threshold is computed using the (n+1) rule from
crate::conformal_alert, providing distribution-free coverage guarantees.
§Key Invariants
- Latency bound: Alert if latency exceeds calibrated threshold
- FPR control: False positive rate <= alpha (configurable)
- Anytime-valid: E-process layer prevents FPR inflation from early stopping
- Full provenance: Every alert includes evidence ledger
§Usage
ⓘ
use ftui_runtime::resize_sla::{ResizeSlaMonitor, SlaConfig};
use ftui_runtime::resize_coalescer::{ResizeCoalescer, TelemetryHooks};
let sla_monitor = ResizeSlaMonitor::new(SlaConfig::default());
let hooks = sla_monitor.make_hooks();
let coalescer = ResizeCoalescer::new(config, (80, 24))
.with_telemetry_hooks(hooks);
// SLA violations are logged and can be queried
if let Some(alert) = sla_monitor.last_alert() {
println!("SLA violation: {}", alert.evidence_summary());
}Structs§
- Resize
Evidence - Evidence for a single resize operation.
- Resize
SlaMonitor - Resize SLA monitor with conformal alerting.
- SlaConfig
- Configuration for resize SLA monitoring.
- SlaLog
Entry - SLA event log entry for JSONL output.
- SlaSummary
- Summary statistics for SLA monitoring.
Functions§
- make_
sla_ hooks - Create TelemetryHooks that feed into an SLA monitor.