refactor: Restructure Performance Profiler and Dashboard Integration

- Updated file paths for performance-related headers to reflect new directory structure under `app/gfx/performance/`.
- Introduced new `PerformanceDashboard` and `PerformanceProfiler` classes for comprehensive performance monitoring and reporting.
- Enhanced performance metrics collection and visualization capabilities, including real-time updates and detailed reports.
- Improved memory usage tracking and optimization status analysis within the graphics system.
- Ensured compatibility with existing components by updating include directives across multiple files.
This commit is contained in:
scawful
2025-10-10 10:05:21 -04:00
parent a2de6ba7d1
commit 411f842b20
25 changed files with 42 additions and 42 deletions

View File

@@ -29,7 +29,7 @@
#include "app/editor/ui/editor_selection_dialog.h"
#include "app/emu/emulator.h"
#include "app/gfx/arena.h"
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance/performance_profiler.h"
#include "app/editor/ui/background_renderer.h"
#include "app/gui/icons.h"
#include "app/gui/input.h"
@@ -53,7 +53,7 @@
#include "app/editor/system/settings_editor.h"
#include "app/editor/system/toast_manager.h"
#include "app/emu/emulator.h"
#include "app/gfx/performance_dashboard.h"
#include "app/gfx/performance/performance_dashboard.h"
#include "editor/editor.h"
#ifdef YAZE_WITH_GRPC
#include "app/core/service/screenshot_utils.h"

View File

@@ -37,7 +37,7 @@
#include "app/editor/ui/editor_selection_dialog.h"
#include "app/editor/ui/welcome_screen.h"
#include "app/emu/emulator.h"
#include "app/gfx/performance_dashboard.h"
#include "app/gfx/performance/performance_dashboard.h"
#include "app/rom.h"
#include "yaze_config.h"

View File

@@ -21,7 +21,7 @@
#include "app/gui/modules/asset_browser.h"
#include "app/gui/style.h"
#include "app/rom.h"
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance/performance_profiler.h"
#include "imgui/imgui.h"
#include "imgui/misc/cpp/imgui_stdlib.h"
#include "imgui_memory_editor.h"

View File

@@ -2,7 +2,7 @@
#include "absl/status/status.h"
#include "absl/strings/str_cat.h"
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance/performance_profiler.h"
#include "app/gfx/snes_palette.h"
#include "app/gui/color.h"
#include "imgui/imgui.h"

View File

@@ -6,13 +6,13 @@
#include "absl/strings/str_format.h"
#include "absl/strings/string_view.h"
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance/performance_profiler.h"
#include "util/file_util.h"
#include "app/core/window.h"
#include "app/gfx/arena.h"
#include "app/gfx/atlas_renderer.h"
#include "app/gfx/bitmap.h"
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance/performance_profiler.h"
#include "app/gfx/snes_tile.h"
#include "app/gui/canvas.h"
#include "app/gui/color.h"

View File

@@ -7,7 +7,7 @@
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"
#include "app/gfx/arena.h"
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance/performance_profiler.h"
#include "util/file_util.h"
#include "app/gfx/bitmap.h"
#include "app/gfx/snes_palette.h"

View File

@@ -1,7 +1,7 @@
#include "music_editor.h"
#include "absl/strings/str_format.h"
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance/performance_profiler.h"
#include "app/editor/code/assembly_editor.h"
#include "app/emu/emulator.h"
#include "app/gui/icons.h"

View File

@@ -1,6 +1,6 @@
#include "app/editor/overworld/map_properties.h"
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance/performance_profiler.h"
#include "app/editor/overworld/overworld_editor.h"
#include "app/editor/overworld/ui_constants.h"
#include "app/gui/canvas.h"

View File

@@ -20,7 +20,7 @@
#include "app/gfx/arena.h"
#include "app/gfx/bitmap.h"
#include "app/gui/widgets/tile_selector_widget.h"
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance/performance_profiler.h"
#include "app/gfx/snes_palette.h"
#include "app/gfx/tilemap.h"
#include "app/gui/canvas.h"

View File

@@ -12,14 +12,14 @@
#include "absl/strings/str_format.h"
#include "app/core/asar_wrapper.h"
#include "app/core/features.h"
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance/performance_profiler.h"
#include "app/core/window.h"
#include "app/editor/overworld/entity.h"
#include "app/editor/overworld/map_properties.h"
#include "app/editor/overworld/tile16_editor.h"
#include "app/gfx/arena.h"
#include "app/gfx/bitmap.h"
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance/performance_profiler.h"
#include "app/gfx/snes_palette.h"
#include "app/gfx/tilemap.h"
#include "app/gui/canvas.h"

View File

@@ -6,7 +6,7 @@
#include "app/gfx/arena.h"
#include "app/gfx/bitmap.h"
#include "app/gfx/backend/irenderer.h"
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance/performance_profiler.h"
#include "app/gfx/snes_palette.h"
#include "app/gui/canvas.h"
#include "app/gui/input.h"

View File

@@ -1,6 +1,6 @@
#include "sprite_editor.h"
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance/performance_profiler.h"
#include "gui/ui_helpers.h"
#include "util/file_util.h"
#include "app/editor/sprite/zsprite.h"

View File

@@ -3,7 +3,7 @@
#include "absl/status/status.h"
#include "app/gui/feature_flags_menu.h"
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance/performance_profiler.h"
#include "app/gui/style.h"
#include "app/gui/icons.h"
#include "app/gui/theme_manager.h"

View File

@@ -7,7 +7,7 @@
#include <memory>
#include "app/gfx/bitmap.h"
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance/performance_profiler.h"
#include "app/gfx/bpp_format_manager.h"
namespace yaze {

View File

@@ -8,7 +8,7 @@
#include <stdexcept>
#include "app/gfx/arena.h"
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance/performance_profiler.h"
#include "app/gfx/snes_palette.h"
#include "util/log.h"

View File

@@ -9,7 +9,7 @@
#include "app/gfx/bitmap.h"
#include "app/gfx/snes_palette.h"
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance/performance_profiler.h"
namespace yaze {
namespace gfx {

View File

@@ -6,8 +6,8 @@ set(
app/gfx/bitmap.cc
app/gfx/compression.cc
app/gfx/memory_pool.cc
app/gfx/performance_dashboard.cc
app/gfx/performance_profiler.cc
app/gfx/performance/performance_dashboard.cc
app/gfx/performance/performance_profiler.cc
app/gfx/scad_format.cc
app/gfx/snes_palette.cc
app/gfx/snes_tile.cc

View File

@@ -6,7 +6,7 @@
#include <string>
#include "app/gfx/bpp_format_manager.h"
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance/performance_profiler.h"
namespace yaze {
namespace gfx {

View File

@@ -1,4 +1,4 @@
#include "app/gfx/performance_dashboard.h"
#include "app/gfx/performance/performance_dashboard.h"
#include <algorithm>
#include <iomanip>
@@ -6,7 +6,7 @@
#include "app/gfx/atlas_renderer.h"
#include "app/gfx/memory_pool.h"
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance/performance_profiler.h"
#include "imgui/imgui.h"
namespace yaze {

View File

@@ -1,12 +1,12 @@
#ifndef YAZE_APP_GFX_PERFORMANCE_DASHBOARD_H
#define YAZE_APP_GFX_PERFORMANCE_DASHBOARD_H
#ifndef YAZE_APP_GFX_PERFORMANCE_PERFORMANCE_DASHBOARD_H
#define YAZE_APP_GFX_PERFORMANCE_PERFORMANCE_DASHBOARD_H
#include <string>
#include <vector>
#include <memory>
#include <chrono>
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance/performance_profiler.h"
#include "app/gfx/memory_pool.h"
#include "app/gfx/atlas_renderer.h"
@@ -159,4 +159,4 @@ class PerformanceDashboard {
} // namespace gfx
} // namespace yaze
#endif // YAZE_APP_GFX_PERFORMANCE_DASHBOARD_H
#endif // YAZE_APP_GFX_PERFORMANCE_PERFORMANCE_DASHBOARD_H

View File

@@ -1,4 +1,4 @@
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance/performance_profiler.h"
#include <algorithm>
#include <iomanip>

View File

@@ -1,5 +1,5 @@
#ifndef YAZE_APP_GFX_PERFORMANCE_PROFILER_H
#define YAZE_APP_GFX_PERFORMANCE_PROFILER_H
#ifndef YAZE_APP_GFX_PERFORMANCE_PERFORMANCE_PROFILER_H
#define YAZE_APP_GFX_PERFORMANCE_PERFORMANCE_PROFILER_H
#include <chrono>
#include <string>
@@ -206,4 +206,4 @@ class ScopedTimer {
} // namespace gfx
} // namespace yaze
#endif // YAZE_APP_GFX_PERFORMANCE_PROFILER_H
#endif // YAZE_APP_GFX_PERFORMANCE_PERFORMANCE_PROFILER_H

View File

@@ -5,7 +5,7 @@
#include "app/gfx/arena.h"
#include "app/gfx/atlas_renderer.h"
#include "app/gfx/bitmap.h"
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance/performance_profiler.h"
#include "app/gfx/snes_tile.h"
namespace yaze {

View File

@@ -4,7 +4,7 @@
#include <string>
#include "app/gfx/bpp_format_manager.h"
#include "app/gfx/bitmap.h"
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance/performance_profiler.h"
#include "app/gui/canvas_utils.h"
#include "app/gui/style.h"
#include "app/gui/canvas/canvas_automation_api.h"
@@ -150,8 +150,8 @@ void Canvas::Cleanup() {
selection_.Clear();
// Stop performance monitoring before cleanup to prevent segfault
if (performance_integration_) {
performance_integration_->StopMonitoring();
if (performance/performance_integration_) {
performance/performance_integration_->StopMonitoring();
}
// Cleanup enhanced components
@@ -175,7 +175,7 @@ void Canvas::InitializeEnhancedComponents() {
canvas::CanvasUsageManager::Get().RegisterTracker(canvas_id_, usage_tracker_);
// Initialize performance integration
performance_integration_ =
performance/performance_integration_ =
std::make_shared<canvas::CanvasPerformanceIntegration>();
performance_integration_->Initialize(canvas_id_);
performance_integration_->SetUsageTracker(usage_tracker_);
@@ -208,15 +208,15 @@ void Canvas::RecordCanvasOperation(const std::string& operation_name,
if (usage_tracker_) {
usage_tracker_->RecordOperation(operation_name, time_ms);
}
if (performance_integration_) {
performance_integration_->RecordOperation(operation_name, time_ms,
if (performance/performance_integration_) {
performance/performance_integration_->RecordOperation(operation_name, time_ms,
GetUsageMode());
}
}
void Canvas::ShowPerformanceUI() {
if (performance_integration_) {
performance_integration_->RenderPerformanceUI();
if (performance/performance_integration_) {
performance/performance_integration_->RenderPerformanceUI();
}
}

View File

@@ -10,7 +10,7 @@
#include "absl/status/status.h"
#include "app/core/features.h"
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance/performance_profiler.h"
#include "app/gfx/compression.h"
#include "app/gfx/snes_tile.h"
#include "app/rom.h"