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:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
@@ -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
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "app/gfx/performance_profiler.h"
|
||||
#include "app/gfx/performance/performance_profiler.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <iomanip>
|
||||
@@ -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
|
||||
@@ -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 {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user