Comprehensive performance monitoring dashboard for YAZE graphics system. More...
#include <performance_dashboard.h>
Classes | |
struct | OptimizationStatus |
struct | PerformanceMetrics |
Public Member Functions | |
void | Initialize () |
Initialize the performance dashboard. | |
void | Update () |
Update dashboard with current performance data. | |
void | Render () |
Render the performance dashboard UI. | |
void | SetVisible (bool visible) |
Show/hide the dashboard. | |
bool | IsVisible () const |
PerformanceSummary | GetSummary () const |
Get current performance summary. | |
std::string | ExportReport () const |
Export performance report. | |
Static Public Member Functions | |
static PerformanceDashboard & | Get () |
Private Member Functions | |
PerformanceDashboard ()=default | |
~PerformanceDashboard ()=default | |
void | RenderMetricsPanel () const |
void | RenderOptimizationStatus () const |
void | RenderMemoryUsage () |
void | RenderFrameRateGraph () |
void | RenderRecommendations () const |
void | CollectMetrics () |
void | UpdateOptimizationStatus () |
void | AnalyzePerformance () |
std::string | GetOptimizationRecommendation () const |
Static Private Member Functions | |
static double | CalculateAverage (const std::vector< double > &values) |
static double | CalculatePercentile (const std::vector< double > &values, double percentile) |
static std::string | FormatTime (double time_us) |
static std::string | FormatMemory (size_t bytes) |
Private Attributes | |
bool | visible_ |
PerformanceMetrics | current_metrics_ |
PerformanceMetrics | previous_metrics_ |
OptimizationStatus | optimization_status_ |
std::chrono::high_resolution_clock::time_point | last_update_time_ |
std::vector< double > | frame_time_history_ |
std::vector< double > | memory_usage_history_ |
Static Private Attributes | |
static constexpr size_t | kHistorySize = 100 |
static constexpr double | kUpdateIntervalMs = 100.0 |
Comprehensive performance monitoring dashboard for YAZE graphics system.
The PerformanceDashboard provides real-time monitoring and analysis of graphics performance in the YAZE ROM hacking editor. It displays key metrics, optimization status, and provides recommendations for performance improvements.
Key Features:
Performance Metrics:
ROM Hacking Specific:
Definition at line 59 of file performance_dashboard.h.
|
privatedefault |
|
privatedefault |
|
static |
Definition at line 15 of file performance_dashboard.cc.
Referenced by yaze::editor::EditorManager::DrawMenuBar(), yaze::gui::canvas::CanvasPerformanceIntegration::Initialize(), yaze::gui::canvas::CanvasModals::RenderAdvancedPropertiesModal(), yaze::gui::canvas::CanvasContextMenu::RenderPerformanceMenu(), yaze::gui::canvas::CanvasModals::RenderPerformanceModal(), yaze::gfx::TEST_F(), and yaze::editor::EditorManager::Update().
void yaze::gfx::PerformanceDashboard::Initialize | ( | ) |
Initialize the performance dashboard.
Definition at line 20 of file performance_dashboard.cc.
References frame_time_history_, kHistorySize, last_update_time_, memory_usage_history_, and visible_.
void yaze::gfx::PerformanceDashboard::Update | ( | ) |
Update dashboard with current performance data.
Definition at line 27 of file performance_dashboard.cc.
References AnalyzePerformance(), CollectMetrics(), kUpdateIntervalMs, last_update_time_, and UpdateOptimizationStatus().
Referenced by yaze::editor::EditorManager::DrawMenuBar().
void yaze::gfx::PerformanceDashboard::Render | ( | ) |
Render the performance dashboard UI.
Definition at line 40 of file performance_dashboard.cc.
References RenderFrameRateGraph(), RenderMemoryUsage(), RenderMetricsPanel(), RenderOptimizationStatus(), RenderRecommendations(), and visible_.
Referenced by yaze::editor::EditorManager::DrawMenuBar(), and yaze::editor::EditorManager::Update().
|
inline |
Show/hide the dashboard.
Definition at line 81 of file performance_dashboard.h.
References visible_.
Referenced by yaze::editor::EditorManager::DrawMenuBar(), yaze::gui::canvas::CanvasModals::RenderAdvancedPropertiesModal(), yaze::gui::canvas::CanvasContextMenu::RenderPerformanceMenu(), and yaze::gui::canvas::CanvasModals::RenderPerformanceModal().
|
inline |
Definition at line 82 of file performance_dashboard.h.
References visible_.
PerformanceSummary yaze::gfx::PerformanceDashboard::GetSummary | ( | ) | const |
Get current performance summary.
Definition at line 60 of file performance_dashboard.cc.
References yaze::gfx::PerformanceDashboard::OptimizationStatus::atlas_rendering_enabled, yaze::gfx::PerformanceSummary::average_frame_time_ms, yaze::gfx::PerformanceDashboard::OptimizationStatus::batch_operations_enabled, yaze::gfx::PerformanceSummary::cache_hit_ratio, yaze::gfx::PerformanceDashboard::PerformanceMetrics::cache_hit_ratio, CalculateAverage(), current_metrics_, yaze::gfx::PerformanceDashboard::OptimizationStatus::dirty_region_tracking_enabled, frame_time_history_, yaze::gfx::PerformanceDashboard::OptimizationStatus::memory_pool_active, yaze::gfx::PerformanceSummary::memory_usage_mb, yaze::gfx::PerformanceDashboard::PerformanceMetrics::memory_usage_mb, yaze::gfx::PerformanceSummary::optimization_score, optimization_status_, yaze::gfx::PerformanceDashboard::OptimizationStatus::palette_lookup_optimized, yaze::gfx::PerformanceSummary::recommendations, yaze::gfx::PerformanceDashboard::OptimizationStatus::resource_pooling_active, and yaze::gfx::PerformanceSummary::status_message.
Referenced by ExportReport(), GetOptimizationRecommendation(), RenderOptimizationStatus(), RenderRecommendations(), and yaze::gfx::TEST_F().
std::string yaze::gfx::PerformanceDashboard::ExportReport | ( | ) | const |
Export performance report.
Definition at line 118 of file performance_dashboard.cc.
References yaze::gfx::PerformanceDashboard::OptimizationStatus::atlas_rendering_enabled, yaze::gfx::PerformanceDashboard::PerformanceMetrics::batch_operation_time_us, yaze::gfx::PerformanceDashboard::OptimizationStatus::batch_operations_enabled, yaze::gfx::PerformanceDashboard::PerformanceMetrics::cache_hit_ratio, current_metrics_, yaze::gfx::PerformanceDashboard::OptimizationStatus::dirty_region_tracking_enabled, yaze::gfx::PerformanceDashboard::PerformanceMetrics::draw_calls_per_frame, FormatTime(), yaze::gfx::PerformanceDashboard::PerformanceMetrics::frame_time_ms, GetSummary(), yaze::gfx::PerformanceDashboard::OptimizationStatus::memory_pool_active, yaze::gfx::PerformanceDashboard::PerformanceMetrics::memory_usage_mb, optimization_status_, yaze::gfx::PerformanceDashboard::OptimizationStatus::palette_lookup_optimized, yaze::gfx::PerformanceDashboard::PerformanceMetrics::palette_lookup_time_us, yaze::gfx::PerformanceDashboard::OptimizationStatus::resource_pooling_active, yaze::gfx::PerformanceDashboard::PerformanceMetrics::texture_update_time_us, and yaze::gfx::PerformanceDashboard::PerformanceMetrics::texture_updates_per_frame.
Referenced by RenderRecommendations().
|
private |
Definition at line 177 of file performance_dashboard.cc.
References yaze::gfx::PerformanceDashboard::PerformanceMetrics::batch_operation_time_us, yaze::gfx::PerformanceDashboard::PerformanceMetrics::cache_hit_ratio, current_metrics_, yaze::gfx::PerformanceDashboard::PerformanceMetrics::draw_calls_per_frame, FormatTime(), yaze::gfx::PerformanceDashboard::PerformanceMetrics::frame_time_ms, yaze::gfx::PerformanceDashboard::PerformanceMetrics::memory_usage_mb, yaze::gfx::PerformanceDashboard::PerformanceMetrics::palette_lookup_time_us, yaze::gfx::PerformanceDashboard::PerformanceMetrics::texture_update_time_us, and yaze::gfx::PerformanceDashboard::PerformanceMetrics::texture_updates_per_frame.
Referenced by Render().
|
private |
Definition at line 202 of file performance_dashboard.cc.
References yaze::gfx::PerformanceDashboard::OptimizationStatus::atlas_rendering_enabled, yaze::gfx::PerformanceDashboard::OptimizationStatus::batch_operations_enabled, yaze::gfx::PerformanceDashboard::OptimizationStatus::dirty_region_tracking_enabled, GetSummary(), yaze::gfx::PerformanceDashboard::OptimizationStatus::memory_pool_active, optimization_status_, yaze::gfx::PerformanceDashboard::OptimizationStatus::palette_lookup_optimized, and yaze::gfx::PerformanceDashboard::OptimizationStatus::resource_pooling_active.
Referenced by Render().
|
private |
Definition at line 242 of file performance_dashboard.cc.
References FormatMemory(), yaze::gfx::AtlasRenderer::Get(), yaze::gfx::MemoryPool::Get(), yaze::gfx::MemoryPool::GetMemoryStats(), yaze::gfx::AtlasRenderer::GetStats(), and memory_usage_history_.
Referenced by Render().
|
private |
Definition at line 278 of file performance_dashboard.cc.
References CalculateAverage(), CalculatePercentile(), and frame_time_history_.
Referenced by Render().
|
private |
Definition at line 310 of file performance_dashboard.cc.
References yaze::gfx::PerformanceProfiler::Clear(), ExportReport(), yaze::gfx::PerformanceProfiler::GenerateReport(), yaze::gfx::PerformanceProfiler::Get(), GetSummary(), yaze::gfx::PerformanceProfiler::IsEnabled(), and yaze::gfx::PerformanceProfiler::SetEnabled().
Referenced by Render().
|
private |
Definition at line 350 of file performance_dashboard.cc.
References yaze::gfx::PerformanceDashboard::PerformanceMetrics::batch_operation_time_us, yaze::gfx::PerformanceDashboard::PerformanceMetrics::cache_hit_ratio, current_metrics_, yaze::gfx::PerformanceDashboard::PerformanceMetrics::draw_calls_per_frame, frame_time_history_, yaze::gfx::PerformanceDashboard::PerformanceMetrics::frame_time_ms, yaze::gfx::MemoryPool::Get(), yaze::gfx::PerformanceProfiler::Get(), yaze::gfx::MemoryPool::GetMemoryStats(), kHistorySize, memory_usage_history_, yaze::gfx::PerformanceDashboard::PerformanceMetrics::memory_usage_mb, yaze::gfx::PerformanceDashboard::PerformanceMetrics::palette_lookup_time_us, yaze::gfx::PerformanceDashboard::PerformanceMetrics::texture_update_time_us, and yaze::gfx::PerformanceDashboard::PerformanceMetrics::texture_updates_per_frame.
Referenced by Update().
|
private |
Definition at line 427 of file performance_dashboard.cc.
References yaze::gfx::PerformanceDashboard::OptimizationStatus::atlas_rendering_enabled, yaze::gfx::PerformanceDashboard::OptimizationStatus::batch_operations_enabled, yaze::gfx::PerformanceDashboard::OptimizationStatus::dirty_region_tracking_enabled, yaze::gfx::MemoryPool::Get(), yaze::gfx::PerformanceProfiler::Get(), yaze::gfx::MemoryPool::GetMemoryStats(), yaze::gfx::PerformanceDashboard::OptimizationStatus::memory_pool_active, optimization_status_, yaze::gfx::PerformanceDashboard::OptimizationStatus::palette_lookup_optimized, and yaze::gfx::PerformanceDashboard::OptimizationStatus::resource_pooling_active.
Referenced by Update().
|
private |
Definition at line 458 of file performance_dashboard.cc.
References current_metrics_, yaze::gfx::PerformanceDashboard::PerformanceMetrics::frame_time_ms, and previous_metrics_.
Referenced by Update().
|
staticprivate |
Definition at line 471 of file performance_dashboard.cc.
Referenced by GetSummary(), and RenderFrameRateGraph().
|
staticprivate |
Definition at line 483 of file performance_dashboard.cc.
Referenced by RenderFrameRateGraph().
|
staticprivate |
Definition at line 500 of file performance_dashboard.cc.
Referenced by ExportReport(), and RenderMetricsPanel().
|
staticprivate |
Definition at line 510 of file performance_dashboard.cc.
Referenced by RenderMemoryUsage().
|
private |
Definition at line 520 of file performance_dashboard.cc.
References GetSummary().
|
private |
Definition at line 127 of file performance_dashboard.h.
Referenced by Initialize(), IsVisible(), Render(), and SetVisible().
|
private |
Definition at line 128 of file performance_dashboard.h.
Referenced by AnalyzePerformance(), CollectMetrics(), ExportReport(), GetSummary(), and RenderMetricsPanel().
|
private |
Definition at line 129 of file performance_dashboard.h.
Referenced by AnalyzePerformance().
|
private |
Definition at line 130 of file performance_dashboard.h.
Referenced by ExportReport(), GetSummary(), RenderOptimizationStatus(), and UpdateOptimizationStatus().
|
private |
Definition at line 132 of file performance_dashboard.h.
Referenced by Initialize(), and Update().
|
private |
Definition at line 133 of file performance_dashboard.h.
Referenced by CollectMetrics(), GetSummary(), Initialize(), and RenderFrameRateGraph().
|
private |
Definition at line 134 of file performance_dashboard.h.
Referenced by CollectMetrics(), Initialize(), and RenderMemoryUsage().
|
staticconstexprprivate |
Definition at line 136 of file performance_dashboard.h.
Referenced by CollectMetrics(), and Initialize().
|
staticconstexprprivate |
Definition at line 137 of file performance_dashboard.h.
Referenced by Update().