From bf8868191a92130661bc926a5aee7016865631b8 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sat, 7 Mar 2026 10:29:41 -0500 Subject: [PATCH] remove perf dashboard not useful needs to be relevant to gui2 profiling. --- .../performance_dashboard_20260306/index.md | 9 -- .../metadata.json | 9 -- .../performance_dashboard_20260306/plan.md | 87 -------------- .../performance_dashboard_20260306/spec.md | 108 ------------------ 4 files changed, 213 deletions(-) delete mode 100644 conductor/tracks/performance_dashboard_20260306/index.md delete mode 100644 conductor/tracks/performance_dashboard_20260306/metadata.json delete mode 100644 conductor/tracks/performance_dashboard_20260306/plan.md delete mode 100644 conductor/tracks/performance_dashboard_20260306/spec.md diff --git a/conductor/tracks/performance_dashboard_20260306/index.md b/conductor/tracks/performance_dashboard_20260306/index.md deleted file mode 100644 index 4aeb428..0000000 --- a/conductor/tracks/performance_dashboard_20260306/index.md +++ /dev/null @@ -1,9 +0,0 @@ -# Performance Dashboard - -**Track ID:** performance_dashboard_20260306 - -**Status:** Planned - -**See Also:** -- [Spec](./spec.md) -- [Plan](./plan.md) diff --git a/conductor/tracks/performance_dashboard_20260306/metadata.json b/conductor/tracks/performance_dashboard_20260306/metadata.json deleted file mode 100644 index 81827cf..0000000 --- a/conductor/tracks/performance_dashboard_20260306/metadata.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "id": "performance_dashboard_20260306", - "name": "Performance Dashboard", - "status": "planned", - "created_at": "2026-03-06T00:00:00Z", - "updated_at": "2026-03-06T00:00:00Z", - "type": "feature", - "priority": "medium" -} \ No newline at end of file diff --git a/conductor/tracks/performance_dashboard_20260306/plan.md b/conductor/tracks/performance_dashboard_20260306/plan.md deleted file mode 100644 index 0feaf5c..0000000 --- a/conductor/tracks/performance_dashboard_20260306/plan.md +++ /dev/null @@ -1,87 +0,0 @@ -# Implementation Plan: Performance Dashboard (performance_dashboard_20260306) - -> **Reference:** [Spec](./spec.md) | [Architecture Guide](../../../docs/guide_architecture.md) - -## Phase 1: Historical Data Storage -Focus: Add history buffer to PerformanceMonitor - -- [ ] Task 1.1: Initialize MMA Environment -- [ ] Task 1.2: Add history deque to PerformanceMonitor - - WHERE: `src/performance_monitor.py` `PerformanceMonitor.__init__` - - WHAT: Rolling window of metrics - - HOW: - ```python - from collections import deque - self._history: deque = deque(maxlen=100) - ``` - -- [ ] Task 1.3: Store metrics each frame - - WHERE: `src/performance_monitor.py` `end_frame()` - - WHAT: Append current metrics to history - - HOW: - ```python - def end_frame(self) -> None: - # ... existing code ... - self._history.append({ - "fps": self._fps, "frame_time_ms": self._frame_time_ms, - "cpu_percent": self._cpu_percent, "input_lag_ms": self._input_lag_ms - }) - ``` - -- [ ] Task 1.4: Add get_history method - - WHERE: `src/performance_monitor.py` - - HOW: - ```python - def get_history(self) -> list[dict]: - return list(self._history) - ``` - -## Phase 2: CPU Graph -Focus: Render CPU usage over time - -- [ ] Task 2.1: Extract CPU values from history - - WHERE: `src/gui_2.py` diagnostics panel - - WHAT: Get CPU% array for plotting - - HOW: - ```python - history = self.perf_monitor.get_history() - cpu_values = [h["cpu_percent"] for h in history] - ``` - -- [ ] Task 2.2: Render line graph - - WHERE: `src/gui_2.py` - - WHAT: imgui.plot_lines for CPU - - HOW: - ```python - if imgui.collapsing_header("CPU Usage"): - imgui.plot_lines("##cpu", cpu_values, scale_min=0, scale_max=100) - imgui.text(f"Current: {cpu_values[-1]:.1f}%" if cpu_values else "N/A") - ``` - -## Phase 3: Frame Time Histogram -Focus: Show frame time distribution - -- [ ] Task 3.1: Bucket frame times - - WHERE: `src/gui_2.py` - - WHAT: Categorize into 0-16ms, 16-33ms, 33+ms - - HOW: - ```python - buckets = [0, 0, 0] # <16ms, 16-33ms, 33+ms - for h in history: - ft = h["frame_time_ms"] - if ft < 16: buckets[0] += 1 - elif ft < 33: buckets[1] += 1 - else: buckets[2] += 1 - ``` - -- [ ] Task 3.2: Render histogram - - WHERE: `src/gui_2.py` - - HOW: - ```python - imgui.plot_histogram("##frametime", buckets) - imgui.text("<16ms: {} 16-33ms: {} >33ms: {}".format(*buckets)) - ``` - -## Phase 4: Testing -- [ ] Task 4.1: Write unit tests -- [ ] Task 4.2: Conductor - Phase Verification diff --git a/conductor/tracks/performance_dashboard_20260306/spec.md b/conductor/tracks/performance_dashboard_20260306/spec.md deleted file mode 100644 index 332f172..0000000 --- a/conductor/tracks/performance_dashboard_20260306/spec.md +++ /dev/null @@ -1,108 +0,0 @@ -# Track Specification: Performance Dashboard (performance_dashboard_20260306) - - -## Overview -Expand performance metrics panel with CPU/RAM graphs, frame time histogram. Uses existing `performance_monitor.py`. - -## Current State Audit - -### Already Implemented (DO NOT re-implement) - -#### PerformanceMonitor (src/performance_monitor.py) -- **`PerformanceMonitor` class**: Tracks FPS, frame time, CPU, input lag -- **`start_frame()`**: Called at frame start -- **`end_frame()`**: Called at frame end -- **`record_input_event()`**: Track input latency -- **`get_metrics()`**: Returns dict with: - ```python - { - "fps": float, - "frame_time_ms": float - "cpu_percent": float - "input_lag_ms": float - } - ``` -- **No historical storage** - metrics are per-frame only - -### Gaps to Fill (This Track's Scope) -- No historical graphs of CPU/RAM over time -- No rolling window storage -- No frame time histogram - -## Architectural Constraints - -### 60fps During Graphs -- Graph rendering MUST NOT impact frame rate -- Use simple line rendering (imgui.plot_lines) - -### Memory Bounds -- Rolling window: max 100 data points (deque) -- Memory per point: ~16 bytes (4 floats) - -## Architecture Reference - -### Key Integration Points - -| File | Lines | Purpose | -|------|-------|---------| -| `src/performance_monitor.py` | 10-80 | `PerformanceMonitor` class | -| `src/gui_2.py` | ~2800-2900 | Diagnostics panel - add graphs | - -### Proposed Enhancement -```python -# In PerformanceMonitor: -from collections import deque - -class PerformanceMonitor: - def __init__(self): - self._history: deque = deque(maxlen=100) - - def get_history(self) -> list[dict]: - return list(self._history) -``` - -## Functional Requirements - -### FR1: Historical Data Storage -- Add `_history: deque` to PerformanceMonitor (maxlen=100) -- Store metrics each frame -- `get_history()` returns historical data - -### FR2: CPU Graph -- Line graph showing CPU% over last 100 frames -- X-axis: frame index -- Y-axis: CPU % -- Use imgui.plot_lines() - -### FR3: RAM Graph -- Line graph showing RAM usage -- X-axis: frame index -- Y-axis: MB -- Use imgui.plot_lines() - -### FR4: Frame Time Histogram -- Bar chart showing frame time distribution -- Buckets: 0-16ms, 16-33ms, 33+ms -- Use imgui.plot_histogram() - -## Non-Functional Requirements -| Requirement | Constraint | -|-------------|------------| -| Frame Time Impact | <1ms for graph render | -| Memory | 100 data points max | - -## Testing Requirements -### Unit Tests -- Test history storage limits -- Test graph rendering doesn't crash -### Integration Tests -- Verify graphs display in GUI -- Verify 60fps maintained with graphs - -## Acceptance Criteria -- [ ] CPU graph shows rolling history -- [ ] RAM graph shows rolling history -- [ ] Frame time histogram displays -- [ ] History limited to 100 points -- [ ] Uses existing `PerformanceMonitor.get_metrics()` -- [ ] 1-space indentation maintained