summaryrefslogtreecommitdiffstats
path: root/src/common/profiler_reporting.h
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2016-04-29 09:07:10 +0200
committerYuri Kunde Schlesner <yuriks@yuriks.net>2016-04-29 09:07:10 +0200
commite3a8292495cf0fb4297be27c696649dc44e011f0 (patch)
treef188b106e2d1b39ed7a87972db9f942e15987375 /src/common/profiler_reporting.h
parentMake Citra build with MICROPROFILE_ENABLED set to 0 (#1709) (diff)
downloadyuzu-e3a8292495cf0fb4297be27c696649dc44e011f0.tar
yuzu-e3a8292495cf0fb4297be27c696649dc44e011f0.tar.gz
yuzu-e3a8292495cf0fb4297be27c696649dc44e011f0.tar.bz2
yuzu-e3a8292495cf0fb4297be27c696649dc44e011f0.tar.lz
yuzu-e3a8292495cf0fb4297be27c696649dc44e011f0.tar.xz
yuzu-e3a8292495cf0fb4297be27c696649dc44e011f0.tar.zst
yuzu-e3a8292495cf0fb4297be27c696649dc44e011f0.zip
Diffstat (limited to '')
-rw-r--r--src/common/profiler_reporting.h27
1 files changed, 3 insertions, 24 deletions
diff --git a/src/common/profiler_reporting.h b/src/common/profiler_reporting.h
index df98e05b7..fa1ac883f 100644
--- a/src/common/profiler_reporting.h
+++ b/src/common/profiler_reporting.h
@@ -4,22 +4,17 @@
#pragma once
+#include <chrono>
#include <cstddef>
#include <vector>
-#include "common/profiler.h"
#include "common/synchronized_wrapper.h"
namespace Common {
namespace Profiling {
-struct TimingCategoryInfo {
- static const unsigned int NO_PARENT = -1;
-
- TimingCategory* category;
- const char* name;
- unsigned int parent;
-};
+using Clock = std::chrono::high_resolution_clock;
+using Duration = Clock::duration;
struct ProfilingFrameResult {
/// Time since the last delivered frame
@@ -27,22 +22,12 @@ struct ProfilingFrameResult {
/// Time spent processing a frame, excluding VSync
Duration frame_time;
-
- /// Total amount of time spent inside each category in this frame. Indexed by the category id
- std::vector<Duration> time_per_category;
};
class ProfilingManager final {
public:
ProfilingManager();
- unsigned int RegisterTimingCategory(TimingCategory* category, const char* name);
- void SetTimingCategoryParent(unsigned int category, unsigned int parent);
-
- const std::vector<TimingCategoryInfo>& GetTimingCategoriesInfo() const {
- return timing_categories;
- }
-
/// This should be called after swapping screen buffers.
void BeginFrame();
/// This should be called before swapping screen buffers.
@@ -54,7 +39,6 @@ public:
}
private:
- std::vector<TimingCategoryInfo> timing_categories;
Clock::time_point last_frame_end;
Clock::time_point this_frame_start;
@@ -73,9 +57,6 @@ struct AggregatedFrameResult {
AggregatedDuration frame_time;
float fps;
-
- /// Total amount of time spent inside each category in this frame. Indexed by the category id
- std::vector<AggregatedDuration> time_per_category;
};
class TimingResultsAggregator final {
@@ -83,7 +64,6 @@ public:
TimingResultsAggregator(size_t window_size);
void Clear();
- void SetNumberOfCategories(size_t n);
void AddFrame(const ProfilingFrameResult& frame_result);
@@ -95,7 +75,6 @@ public:
std::vector<Duration> interframe_times;
std::vector<Duration> frame_times;
- std::vector<std::vector<Duration>> times_per_category;
};
ProfilingManager& GetProfilingManager();