diff options
Diffstat (limited to 'src/core/perf_stats.h')
| -rw-r--r-- | src/core/perf_stats.h | 24 |
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 | ||
| 11 | namespace Core { | 11 | namespace Core { |
| 12 | 12 | ||
| 13 | struct 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 { | |||
| 18 | public: | 29 | public: |
| 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 |