archx 3.0.1

High-performance CPU/GPU adaptive optimization library with SIMD and Multithreading
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::detect::HardwareState;

pub struct LoadMonitor;

impl LoadMonitor {
    pub fn is_saturated(state: &HardwareState) -> bool {
        state.cpu.usage > 0.95
    }

    pub fn is_under_pressure(state: &HardwareState) -> bool {
        state.memory.pressure_estimate > 0.9
    }
}