xps 13 3980

This commit is contained in:
2026-02-26 13:37:04 +01:00
commit d6ac8e5931
21 changed files with 4562 additions and 0 deletions

50
src/mediator.rs Normal file
View File

@@ -0,0 +1,50 @@
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 fan_rpm: 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,
}