PowerTools/backend/src/persist/cpu.rs

26 lines
528 B
Rust
Raw Normal View History

2022-07-30 16:33:31 -04:00
use std::default::Default;
//use std::fmt::Display;
use serde::{Deserialize, Serialize};
2022-07-30 16:33:31 -04:00
use super::MinMaxJson;
//const SCALING_FREQUENCIES: &[u64] = &[1700000, 2400000, 2800000];
2022-07-30 16:33:31 -04:00
#[derive(Serialize, Deserialize)]
pub struct CpuJson {
pub online: bool,
pub clock_limits: Option<MinMaxJson<u64>>,
2022-07-30 16:33:31 -04:00
pub governor: String,
}
impl Default for CpuJson {
fn default() -> Self {
Self {
online: true,
clock_limits: None,
2022-07-30 16:33:31 -04:00
governor: "schedutil".to_owned(),
}
}
}