summaryrefslogtreecommitdiff
path: root/src/core/perf_stats.h
diff options
context:
space:
mode:
authorGravatar Lioncash2018-08-31 12:21:34 -0400
committerGravatar Lioncash2018-08-31 16:30:14 -0400
commit4a587b81b285bcd41246329e89591be7cfe37c8a (patch)
tree8eda46d4aac083d23a52223e1a3fc46bc6690a6c /src/core/perf_stats.h
parentMerge pull request #1205 from bunnei/improve-rasterizer-cache-2 (diff)
downloadyuzu-4a587b81b285bcd41246329e89591be7cfe37c8a.tar.gz
yuzu-4a587b81b285bcd41246329e89591be7cfe37c8a.tar.xz
yuzu-4a587b81b285bcd41246329e89591be7cfe37c8a.zip
core/core: Replace includes with forward declarations where applicable
The follow-up to e2457418dae19b889b2ad85255bb95d4cd0e4bff, which replaces most of the includes in the core header with forward declarations. This makes it so that if any of the headers the core header was previously including change, then no one will need to rebuild the bulk of the core, due to core.h being quite a prevalent inclusion. This should make turnaround for changes much faster for developers.
Diffstat (limited to 'src/core/perf_stats.h')
-rw-r--r--src/core/perf_stats.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/core/perf_stats.h b/src/core/perf_stats.h
index 6e4619701..222ac1a63 100644
--- a/src/core/perf_stats.h
+++ b/src/core/perf_stats.h
@@ -10,6 +10,17 @@
10 10
11namespace Core { 11namespace Core {
12 12
13struct PerfStatsResults {
14 /// System FPS (LCD VBlanks) in Hz
15 double system_fps;
16 /// Game FPS (GSP frame submissions) in Hz
17 double game_fps;
18 /// Walltime per system frame, in seconds, excluding any waits
19 double frametime;
20 /// Ratio of walltime / emulated time elapsed
21 double emulation_speed;
22};
23
13/** 24/**
14 * Class to manage and query performance/timing statistics. All public functions of this class are 25 * Class to manage and query performance/timing statistics. All public functions of this class are
15 * thread-safe unless stated otherwise. 26 * thread-safe unless stated otherwise.
@@ -18,22 +29,11 @@ class PerfStats {
18public: 29public:
19 using Clock = std::chrono::high_resolution_clock; 30 using Clock = std::chrono::high_resolution_clock;
20 31
21 struct Results {
22 /// System FPS (LCD VBlanks) in Hz
23 double system_fps;
24 /// Game FPS (GSP frame submissions) in Hz
25 double game_fps;
26 /// Walltime per system frame, in seconds, excluding any waits
27 double frametime;
28 /// Ratio of walltime / emulated time elapsed
29 double emulation_speed;
30 };
31
32 void BeginSystemFrame(); 32 void BeginSystemFrame();
33 void EndSystemFrame(); 33 void EndSystemFrame();
34 void EndGameFrame(); 34 void EndGameFrame();
35 35
36 Results GetAndResetStats(std::chrono::microseconds current_system_time_us); 36 PerfStatsResults GetAndResetStats(std::chrono::microseconds current_system_time_us);
37 37
38 /** 38 /**
39 * Gets the ratio between walltime and the emulated time of the previous system frame. This is 39 * Gets the ratio between walltime and the emulated time of the previous system frame. This is