aboutsummaryrefslogtreecommitdiff
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-05-15 20:34:20 -0400
committerameerj <52414509+ameerj@users.noreply.github.com>2021-05-15 20:34:20 -0400
commit5bef54618a2850e42f7bab45120dab9166468a25 (patch)
treeadc5dbbe050488eb0d85b7a38a5c8310dca9ef92 /src/core/core.cpp
parent904584e4ba0b87e3f1555e29e9bf31109b65e301 (diff)
perf_stats: Rework FPS counter to be more accurate
The FPS counter was based on metrics in the nvdisp swapbuffers call. This metric would be accurate if the gpu thread/renderer were synchronous with the nvdisp service, but that's no longer the case. This commit moves the frame counting responsibility onto the concrete renderers after their frame draw calls. Resulting in more meaningful metrics. The displayed FPS is now made up of the average framerate between the previous and most recent update, in order to avoid distracting FPS counter updates when framerate is oscillating between close values. The status bar update frequency was also changed from 2 seconds to 500ms.
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r--src/core/core.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 434bf32626..47e70c1574 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -289,7 +289,8 @@ struct System::Impl {
telemetry_session->AddField(performance, "Shutdown_EmulationSpeed",
perf_results.emulation_speed * 100.0);
- telemetry_session->AddField(performance, "Shutdown_Framerate", perf_results.game_fps);
+ telemetry_session->AddField(performance, "Shutdown_Framerate",
+ perf_results.average_game_fps);
telemetry_session->AddField(performance, "Shutdown_Frametime",
perf_results.frametime * 1000.0);
telemetry_session->AddField(performance, "Mean_Frametime_MS",