mirror of
https://github.com/ilya-zlobintsev/LACT.git
synced 2025-02-25 18:55:26 -06:00
Formatting
This commit is contained in:
parent
b5a3e554ed
commit
0c002452bf
@ -330,7 +330,7 @@ impl GpuController {
|
|||||||
Ok(a) => Some(a.trim().parse::<u64>().unwrap() / 1024 / 1024),
|
Ok(a) => Some(a.trim().parse::<u64>().unwrap() / 1024 / 1024),
|
||||||
Err(_) => None,
|
Err(_) => None,
|
||||||
};
|
};
|
||||||
|
|
||||||
let gpu_usage = match fs::read_to_string(self.hw_path.join("gpu_busy_percent")) {
|
let gpu_usage = match fs::read_to_string(self.hw_path.join("gpu_busy_percent")) {
|
||||||
Ok(a) => Some(a.trim().parse::<u8>().unwrap()),
|
Ok(a) => Some(a.trim().parse::<u8>().unwrap()),
|
||||||
Err(_) => None,
|
Err(_) => None,
|
||||||
|
@ -100,7 +100,7 @@ impl StatsGrid {
|
|||||||
|
|
||||||
container.attach(&power_usage_box, 0, 2, 1, 1);
|
container.attach(&power_usage_box, 0, 2, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
let gpu_temperature_label = Label::new(None);
|
let gpu_temperature_label = Label::new(None);
|
||||||
{
|
{
|
||||||
let gpu_temperature_box = Box::new(Orientation::Horizontal, 5);
|
let gpu_temperature_box = Box::new(Orientation::Horizontal, 5);
|
||||||
@ -173,13 +173,9 @@ impl StatsGrid {
|
|||||||
stats.power_avg.unwrap_or_else(|| 0),
|
stats.power_avg.unwrap_or_else(|| 0),
|
||||||
stats.power_cap.unwrap_or_else(|| 0)
|
stats.power_cap.unwrap_or_else(|| 0)
|
||||||
));
|
));
|
||||||
self.gpu_temperature_label.set_markup(&format!(
|
self.gpu_temperature_label
|
||||||
"<b>{}°C</b>",
|
.set_markup(&format!("<b>{}°C</b>", stats.gpu_temp.unwrap_or_default()));
|
||||||
stats.gpu_temp.unwrap_or_default()
|
self.gpu_usage_label
|
||||||
));
|
.set_markup(&format!("<b>{}%</b>", stats.gpu_usage.unwrap_or_default()));
|
||||||
self.gpu_usage_label.set_markup(&format!(
|
|
||||||
"<b>{}%</b>",
|
|
||||||
stats.gpu_usage.unwrap_or_default()
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user