feat(mma): complete Phase 6 and finalize Comprehensive GUI UX track
- Implement Live Worker Streaming: wire ai_client.comms_log_callback to Tier 3 streams - Add Parallel DAG Execution using asyncio.gather for non-dependent tickets - Implement Automatic Retry with Model Escalation (Flash-Lite -> Flash -> Pro) - Add Tier Model Configuration UI to MMA Dashboard with project TOML persistence - Fix FPS reporting in PerformanceMonitor to prevent transient 0.0 values - Update Ticket model with retry_count and dictionary-like access - Stabilize Gemini CLI integration tests and handle script approval events in simulations - Finalize and verify all 6 phases of the implementation plan
This commit is contained in:
@@ -9,7 +9,9 @@ class PerformanceMonitor:
|
||||
self._start_time = None
|
||||
self._last_frame_time = 0.0
|
||||
self._fps = 0.0
|
||||
self._last_calculated_fps = 0.0
|
||||
self._frame_count = 0
|
||||
self._total_frame_count = 0
|
||||
self._fps_last_time = time.time()
|
||||
self._process = psutil.Process()
|
||||
self._cpu_usage = 0.0
|
||||
@@ -71,6 +73,7 @@ class PerformanceMonitor:
|
||||
end_time = time.time()
|
||||
self._last_frame_time = (end_time - self._start_time) * 1000.0
|
||||
self._frame_count += 1
|
||||
self._total_frame_count += 1
|
||||
# Calculate input lag if an input occurred during this frame
|
||||
if self._last_input_time is not None:
|
||||
self._input_lag_ms = (end_time - self._last_input_time) * 1000.0
|
||||
@@ -79,6 +82,7 @@ class PerformanceMonitor:
|
||||
elapsed_since_fps = end_time - self._fps_last_time
|
||||
if elapsed_since_fps >= 1.0:
|
||||
self._fps = self._frame_count / elapsed_since_fps
|
||||
self._last_calculated_fps = self._fps
|
||||
self._frame_count = 0
|
||||
self._fps_last_time = end_time
|
||||
|
||||
@@ -105,8 +109,9 @@ class PerformanceMonitor:
|
||||
cpu_usage = self._cpu_usage
|
||||
metrics = {
|
||||
'last_frame_time_ms': self._last_frame_time,
|
||||
'fps': self._fps,
|
||||
'fps': self._last_calculated_fps,
|
||||
'cpu_percent': cpu_usage,
|
||||
'total_frames': self._total_frame_count,
|
||||
'input_lag_ms': self._last_input_time if self._last_input_time else 0.0 # Wait, this should be the calculated lag
|
||||
}
|
||||
# Oops, fixed the input lag logic in previous turn, let's keep it consistent
|
||||
|
||||
Reference in New Issue
Block a user