51 lines
1.1 KiB
Rust
51 lines
1.1 KiB
Rust
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<u32>,
|
|
|
|
// --- High-res History (Last 60s @ 500ms = 120 points) ---
|
|
pub history_watts: Vec<f32>,
|
|
pub history_temp: Vec<f32>,
|
|
pub history_mhz: Vec<f32>,
|
|
|
|
pub log_event: Option<String>,
|
|
pub metadata: std::collections::HashMap<String, String>,
|
|
}
|
|
|
|
#[derive(Debug, Clone)]
|
|
pub enum UiCommand {
|
|
Abort,
|
|
}
|