pub struct HarmonyVector {
pub cpu_load: f32,
pub memory_pressure: f32,
pub swap_usage: f32,
pub thermal_state: ThermalState,
pub temperature_c: Option<f32>,
pub battery_state: BatteryState,
pub battery_percent: f32,
pub disk_io_rate: f32,
pub active: bool,
pub guna: GunaTag,
pub timestamp: DateTime<Utc>,
}Expand description
Harmony Vector — real-time hardware state snapshot.
Superset of Homeostasis with additional
signals: swap, thermal, battery, and disk I/O. Feeds into DharmaGate
via the From<HarmonyVector> for Homeostasis conversion.
This is the Lakshmi (Harmony Monitor) of the Mandala OS — it observes the Annamaya Kosha (Hardware Layer) and reports the system’s physical state to the governance and consciousness layers.
Fields§
§cpu_load: f32CPU load fraction (0.0 = idle, 1.0 = saturated).
memory_pressure: f32Memory pressure fraction (0.0 = plenty, 1.0 = critical).
swap_usage: f32Swap usage fraction (0.0 = none, 1.0 = full).
thermal_state: ThermalStateThermal state classification.
temperature_c: Option<f32>Temperature in Celsius (if available).
battery_state: BatteryStateBattery state classification.
battery_percent: f32Battery charge fraction (0.0 = empty, 1.0 = full).
disk_io_rate: f32Disk I/O rate fraction (0.0 = idle, 1.0 = saturated).
active: boolWhether the system is actively processing.
guna: GunaTagGuna classification of overall resource behavior.
timestamp: DateTime<Utc>When this sample was taken.
Implementations§
Source§impl HarmonyVector
impl HarmonyVector
Sourcepub fn health_score(&self) -> f32
pub fn health_score(&self) -> f32
Compute a comprehensive health score (0.0 = critical, 1.0 = perfect).
Weighted average of CPU (30%), memory (30%), swap (20%), and thermal (20%) health factors.
Sourcepub fn is_stressed(&self) -> bool
pub fn is_stressed(&self) -> bool
Whether the system is under stress (health < 0.3).
Trait Implementations§
Source§impl Clone for HarmonyVector
impl Clone for HarmonyVector
Source§fn clone(&self) -> HarmonyVector
fn clone(&self) -> HarmonyVector
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more