use serde::{Serialize, Deserialize}; #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] pub enum BenchmarkPhase { Auditing, IdleCalibration, StressTesting, PhysicalModeling, Finalizing, } impl Default for BenchmarkPhase { fn default() -> Self { Self::Auditing } } #[derive(Debug, Clone)] pub struct TelemetryState { // --- Static Info --- pub cpu_model: String, pub total_ram_gb: u64, // --- Dynamic States --- pub tick: u64, pub phase: BenchmarkPhase, pub governor: String, pub pl1_limit: f32, pub pl2_limit: f32, pub fan_tier: String, // --- Instantaneous Metrics --- pub cpu_temp: f32, pub power_w: f32, pub current_freq: f32, pub fans: Vec, // --- High-res History (Last 60s @ 500ms = 120 points) --- pub history_watts: Vec, pub history_temp: Vec, pub history_mhz: Vec, pub log_event: Option, pub metadata: std::collections::HashMap, } #[derive(Debug, Clone)] pub enum UiCommand { Abort, }