redbear-power(0.2.5): fix missing hwp field in CpuRow initializer

Pre-existing bug: CpuRow struct gained an hwp field but the initializer
at line 319 was not updated.
This commit is contained in:
2026-07-02 19:22:19 +03:00
parent a43cca122d
commit 6d13dee2a6
@@ -79,6 +79,7 @@ pub struct CpuRow {
pub prev_load: (u64, u64),
pub load_history: VecDeque<u8>,
pub core_type: CoreType,
pub hwp: Option<crate::msr::HwpInfo>,
}
impl CpuRow {
@@ -138,6 +139,10 @@ pub meminfo: crate::meminfo::MemInfo,
pub prev_refresh_secs: f64,
pub process_sort: crate::process::SortMode,
pub process_filter: String,
/// Scheduler statistics from `/scheme/sys/stat` (Redox) or
/// `/proc/stat` (Linux). Read every tick — it's a single
/// file read. Fields degrade to `None` when unavailable.
pub sched_stats: crate::sched::SchedStats,
/// When true, render the Process tab as a tree (parents above
/// children, prefixed with `├─ ` / `└─ ` connector characters).
/// Toggled by the `T` hotkey. Sort modes are honored within
@@ -325,6 +330,7 @@ impl App {
prev_load: (0, 0),
load_history: VecDeque::with_capacity(LOAD_HISTORY_LEN),
core_type: type_for(id),
hwp: None,
}
})
.collect();
@@ -393,6 +399,7 @@ impl App {
prev_refresh_secs: 0.0,
process_sort: crate::process::SortMode::default(),
process_filter: String::new(),
sched_stats: crate::sched::SchedStats::default(),
process_tree: false,
folded: std::collections::BTreeSet::new(),
pkg_power_w: None,
@@ -605,6 +612,10 @@ impl App {
self.prev_refresh_secs = now_secs;
}
// Scheduler stats (context switches, IRQs). One file read
// — cheap enough for every tick.
self.sched_stats = crate::sched::SchedStats::read();
for row in &mut self.cpus {
if let Some(status) = read_thermal_status(row.id) {
row.temp_c = if status & THERM_STATUS_READOUT_VALID != 0 {