Skip to content

Conversation

@multiplex55
Copy link
Owner

Motivation

  • Provide lightweight, throttled diagnostics for the dashboard to help developers observe FPS/frame time and per-widget refresh timings without adding runtime overhead.
  • Surface cache sizes and slow widget refreshes with a dev-only UI so regressions or hotspots are easier to spot while developing.

Description

  • Add a diagnostics metrics collector in src/dashboard/diagnostics.rs that records throttled frame timing and per-widget refresh durations and exposes DashboardDiagnosticsSnapshot and configuration constants like DIAGNOSTICS_REFRESH_INTERVAL and REFRESH_WARNING_THRESHOLD.
  • Record per-widget refresh durations during dashboard rendering by instrumenting render_widget_content in src/dashboard/dashboard.rs and expose update_frame_timing/diagnostics_snapshot helpers on Dashboard.
  • Add a diagnostics dashboard widget in src/dashboard/widgets/diagnostics.rs that displays FPS/frame time, cache sizes, per-widget last refresh time/duration and a small warning indicator for slow refreshes, and register it in WidgetRegistry (src/dashboard/widgets/mod.rs).
  • Add a developer-only settings toggle show_dashboard_diagnostics to Settings (src/settings.rs), expose it in the settings editor UI (src/settings_editor.rs), and wire it into the app (src/gui/mod.rs) so the diagnostics snapshot is passed into DashboardContext when enabled.
  • Include unit tests for diagnostics behavior in src/dashboard/diagnostics.rs that verify frame metric throttling and threshold-triggered widget refresh updates.

Testing

  • Ran the workspace tests focused on diagnostics with cargo test diagnostics; compilation started but the run failed due to a missing system library dependency: alsa required by alsa-sys (pkg-config could not find alsa.pc), so tests did not complete.
  • Unit tests were added for DashboardDiagnostics (throttling and warning threshold behavior) and are expected to pass when system build dependencies are available and cargo test completes.

Codex Task

@multiplex55 multiplex55 merged commit 4b9d337 into master Jan 17, 2026
1 check passed
@multiplex55 multiplex55 deleted the codex/add-performance-metrics-diagnostics-widget branch January 17, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants