Add dashboard diagnostics metrics widget and settings toggle #710
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Description
src/dashboard/diagnostics.rsthat records throttled frame timing and per-widget refresh durations and exposesDashboardDiagnosticsSnapshotand configuration constants likeDIAGNOSTICS_REFRESH_INTERVALandREFRESH_WARNING_THRESHOLD.render_widget_contentinsrc/dashboard/dashboard.rsand exposeupdate_frame_timing/diagnostics_snapshothelpers onDashboard.diagnosticsdashboard widget insrc/dashboard/widgets/diagnostics.rsthat displays FPS/frame time, cache sizes, per-widget last refresh time/duration and a small warning indicator for slow refreshes, and register it inWidgetRegistry(src/dashboard/widgets/mod.rs).show_dashboard_diagnosticstoSettings(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 intoDashboardContextwhen enabled.src/dashboard/diagnostics.rsthat verify frame metric throttling and threshold-triggered widget refresh updates.Testing
cargo test diagnostics; compilation started but the run failed due to a missing system library dependency:alsarequired byalsa-sys(pkg-config could not findalsa.pc), so tests did not complete.DashboardDiagnostics(throttling and warning threshold behavior) and are expected to pass when system build dependencies are available andcargo testcompletes.Codex Task