yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::gfx::PerformanceDashboard Class Reference

Comprehensive performance monitoring dashboard for YAZE graphics system. More...

#include <performance_dashboard.h>

Collaboration diagram for yaze::gfx::PerformanceDashboard:

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 PerformanceDashboardGet ()
 

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
 

Detailed Description

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:

  • Real-time performance metrics display
  • Optimization status monitoring
  • Memory usage tracking
  • Frame rate analysis
  • Performance regression detection
  • Optimization recommendations

Performance Metrics:

  • Operation timing statistics
  • Memory allocation patterns
  • Cache hit/miss ratios
  • Texture update efficiency
  • Batch operation effectiveness

ROM Hacking Specific:

  • Graphics editing performance analysis
  • Palette operation efficiency
  • Tile rendering performance
  • Graphics sheet loading times

Definition at line 59 of file performance_dashboard.h.

Constructor & Destructor Documentation

◆ PerformanceDashboard()

yaze::gfx::PerformanceDashboard::PerformanceDashboard ( )
privatedefault

◆ ~PerformanceDashboard()

yaze::gfx::PerformanceDashboard::~PerformanceDashboard ( )
privatedefault

Member Function Documentation

◆ Get()

◆ Initialize()

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_.

◆ Update()

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().

Here is the call graph for this function:

◆ Render()

void yaze::gfx::PerformanceDashboard::Render ( )

◆ SetVisible()

◆ IsVisible()

bool yaze::gfx::PerformanceDashboard::IsVisible ( ) const
inline

Definition at line 82 of file performance_dashboard.h.

References visible_.

◆ GetSummary()

◆ ExportReport()

◆ RenderMetricsPanel()

◆ RenderOptimizationStatus()

◆ RenderMemoryUsage()

void yaze::gfx::PerformanceDashboard::RenderMemoryUsage ( )
private

◆ RenderFrameRateGraph()

void yaze::gfx::PerformanceDashboard::RenderFrameRateGraph ( )
private

Definition at line 278 of file performance_dashboard.cc.

References CalculateAverage(), CalculatePercentile(), and frame_time_history_.

Referenced by Render().

Here is the call graph for this function:

◆ RenderRecommendations()

◆ CollectMetrics()

◆ UpdateOptimizationStatus()

◆ AnalyzePerformance()

void yaze::gfx::PerformanceDashboard::AnalyzePerformance ( )
private

◆ CalculateAverage()

double yaze::gfx::PerformanceDashboard::CalculateAverage ( const std::vector< double > &  values)
staticprivate

Definition at line 471 of file performance_dashboard.cc.

Referenced by GetSummary(), and RenderFrameRateGraph().

◆ CalculatePercentile()

double yaze::gfx::PerformanceDashboard::CalculatePercentile ( const std::vector< double > &  values,
double  percentile 
)
staticprivate

Definition at line 483 of file performance_dashboard.cc.

Referenced by RenderFrameRateGraph().

◆ FormatTime()

std::string yaze::gfx::PerformanceDashboard::FormatTime ( double  time_us)
staticprivate

Definition at line 500 of file performance_dashboard.cc.

Referenced by ExportReport(), and RenderMetricsPanel().

◆ FormatMemory()

std::string yaze::gfx::PerformanceDashboard::FormatMemory ( size_t  bytes)
staticprivate

Definition at line 510 of file performance_dashboard.cc.

Referenced by RenderMemoryUsage().

◆ GetOptimizationRecommendation()

std::string yaze::gfx::PerformanceDashboard::GetOptimizationRecommendation ( ) const
private

Definition at line 520 of file performance_dashboard.cc.

References GetSummary().

Here is the call graph for this function:

Member Data Documentation

◆ visible_

bool yaze::gfx::PerformanceDashboard::visible_
private

Definition at line 127 of file performance_dashboard.h.

Referenced by Initialize(), IsVisible(), Render(), and SetVisible().

◆ current_metrics_

PerformanceMetrics yaze::gfx::PerformanceDashboard::current_metrics_
private

◆ previous_metrics_

PerformanceMetrics yaze::gfx::PerformanceDashboard::previous_metrics_
private

Definition at line 129 of file performance_dashboard.h.

Referenced by AnalyzePerformance().

◆ optimization_status_

OptimizationStatus yaze::gfx::PerformanceDashboard::optimization_status_
private

◆ last_update_time_

std::chrono::high_resolution_clock::time_point yaze::gfx::PerformanceDashboard::last_update_time_
private

Definition at line 132 of file performance_dashboard.h.

Referenced by Initialize(), and Update().

◆ frame_time_history_

std::vector<double> yaze::gfx::PerformanceDashboard::frame_time_history_
private

◆ memory_usage_history_

std::vector<double> yaze::gfx::PerformanceDashboard::memory_usage_history_
private

Definition at line 134 of file performance_dashboard.h.

Referenced by CollectMetrics(), Initialize(), and RenderMemoryUsage().

◆ kHistorySize

constexpr size_t yaze::gfx::PerformanceDashboard::kHistorySize = 100
staticconstexprprivate

Definition at line 136 of file performance_dashboard.h.

Referenced by CollectMetrics(), and Initialize().

◆ kUpdateIntervalMs

constexpr double yaze::gfx::PerformanceDashboard::kUpdateIntervalMs = 100.0
staticconstexprprivate

Definition at line 137 of file performance_dashboard.h.

Referenced by Update().


The documentation for this class was generated from the following files: