[PERF] Runtime Telemetry Hot Path
This commit is contained in:
@@ -129,7 +129,7 @@ impl HostRunner {
|
||||
let color_bg = Color::INDIGO; // Dark blue to stand out
|
||||
let color_warn = Color::RED;
|
||||
|
||||
self.hardware.gfx.fill_rect(5, 5, 175, 100, color_bg);
|
||||
self.hardware.gfx.fill_rect(5, 5, 175, 130, color_bg);
|
||||
self.hardware.gfx.draw_text(
|
||||
10,
|
||||
10,
|
||||
@@ -187,8 +187,16 @@ impl HostRunner {
|
||||
);
|
||||
}
|
||||
|
||||
self.hardware.gfx.draw_text(
|
||||
10,
|
||||
82,
|
||||
&format!("RAM: {}KB", tel.heap_used_bytes / 1024),
|
||||
color_text,
|
||||
);
|
||||
self.hardware.gfx.draw_text(10, 90, &format!("LOGS: {}", tel.logs_count), color_text);
|
||||
|
||||
let cert_color = if tel.violations > 0 { color_warn } else { color_text };
|
||||
self.hardware.gfx.draw_text(10, 82, &format!("CERT LAST: {}", tel.violations), cert_color);
|
||||
self.hardware.gfx.draw_text(10, 98, &format!("CERT LAST: {}", tel.violations), cert_color);
|
||||
|
||||
if tel.violations > 0
|
||||
&& let Some(event) = self
|
||||
@@ -204,7 +212,7 @@ impl HostRunner {
|
||||
if msg.len() > 30 {
|
||||
msg.truncate(30);
|
||||
}
|
||||
self.hardware.gfx.draw_text(10, 90, &msg, color_warn);
|
||||
self.hardware.gfx.draw_text(10, 106, &msg, color_warn);
|
||||
}
|
||||
|
||||
if let Some(report) = self.firmware.os.last_crash_report.as_ref() {
|
||||
@@ -212,7 +220,7 @@ impl HostRunner {
|
||||
if msg.len() > 30 {
|
||||
msg.truncate(30);
|
||||
}
|
||||
self.hardware.gfx.draw_text(10, 98, &msg, color_warn);
|
||||
self.hardware.gfx.draw_text(10, 114, &msg, color_warn);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -311,6 +319,9 @@ impl ApplicationHandler for HostRunner {
|
||||
// 1. Process pending debug commands from the network.
|
||||
self.debugger.check_commands(&mut self.firmware, &mut self.hardware);
|
||||
|
||||
// Sync inspection mode state.
|
||||
self.firmware.os.inspection_active = self.overlay_enabled || self.debugger.stream.is_some();
|
||||
|
||||
// 2. Maintain filesystem connection if it was lost (e.g., directory removed).
|
||||
if let Some(root) = &self.fs_root {
|
||||
use prometeu_system::fs::FsState;
|
||||
|
||||
Reference in New Issue
Block a user