Commit graph

18 commits

Author SHA1 Message Date
FearlessTobi
82f6c628e7 Address review comments 2019-09-10 12:57:45 +02:00
fearlessTobi
32c6e238fd Add frametime logging for tracking performance over time
Co-Authored-By: jroweboy <jroweboy@gmail.com>
2019-09-10 12:44:19 +02:00
Lioncash
eb88e9d088 general: Use deducation guides for std::lock_guard and std::unique_lock
Since C++17, the introduction of deduction guides for locking facilities
means that we no longer need to hardcode the mutex type into the locks
themselves, making it easier to switch mutex types, should it ever be
necessary in the future.
2019-04-01 12:53:47 -04:00
Lioncash
eb1e5a40e9 perf_stats: Remove unused variable within DoFrameLimiting()
This hasn't been used since fc6901c205
2018-10-24 00:33:26 -04:00
Lioncash
84f855a61d core/core: Replace includes with forward declarations where applicable
The follow-up to 88597535d6, 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.
2018-08-31 16:30:14 -04:00
bunnei
17abf95e78 Merge pull request #840 from FearlessTobi/port-3353
Port #3353 from Citra: "citra-qt: Add customizable speed limit target "
2018-08-22 01:19:50 -04:00
MerryMage
2336c6bb5f perf_stats: Change MAX_LAG_TIME_US to an appropriate value
25us is far too small, and would result in std::this_thread::sleep_for
being called with this as a maximum value. This means that a guest
application that produces frames instantly would only be limited to
40 kHz.

25ms is a more appropriate value, as it allows for a 60 Hz refresh
rate while providing enough slack in the negative region.
2018-08-21 14:50:50 +01:00
fearlessTobi
fc6901c205 Port #3353 from Citra 2018-08-21 01:14:06 +02:00
Lioncash
610c7e7685 perf_stats: Correct literal used for MAX_LAG_TIME_US
ms is shorthand for milliseconds, not microseconds, and given there's no
comment indicating that this was intentional, it probably wasn't.
2018-08-05 22:12:58 -04:00
Lioncash
c34ee8cf08 core_timing: Make GetGlobalTimeUs() return std::chrono::microseconds
Enforces the time unit being returned and also allows using the standard
time utilities to manipulate it.
2018-08-05 22:07:30 -04:00
Lioncash
043546e4db math_util: Remove the Clamp() function
C++17 adds clamp() to the standard library, so we can remove ours in
favor of it.
2018-04-20 10:14:13 -04:00
James Rowe
263386fe42 UI: Fix frame rate perf stats
Adds in a missing EndGameFrame when nvdrv swaps buffers
2018-01-16 20:44:02 -07:00
James Rowe
d0588e52ab Remove settings issues in sdl and fix a few files that broke in mingw 2018-01-12 19:11:05 -07:00
Yuri Kunde Schlesner
b50b227f94 PerfStats: Re-order and document members better 2017-02-26 17:22:04 -08:00
Yuri Kunde Schlesner
5990d020a8 Core: Re-write frame limiter
Now based on std::chrono, and also works in terms of emulated time
instead of frames, so we can in the future frame-limit even when the
display is disabled, etc.

The frame limiter can also be enabled along with v-sync now, which
should be useful for those with displays running at more than 60 Hz.
2017-02-26 17:22:04 -08:00
Yuri Kunde Schlesner
ea78f30e67 Core: Make PerfStats internally locked
More ergonomic to use and will be required for upcoming changes.
2017-02-26 17:22:03 -08:00
Yuri Kunde Schlesner
60f90d7c48 PerfStats: Add method to get the instantaneous time ratio 2017-02-26 17:22:03 -08:00
Yuri Kunde Schlesner
3a9447bc16 Add performance statistics to status bar 2017-02-26 17:22:03 -08:00