summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/PerformanceMetrics.cpp
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2025-03-05 03:26:34 -0600
committerJordan Woyak <jordan.woyak@gmail.com>2025-03-15 14:40:00 -0500
commit46e0952e97bae2cfdecaeed88f7768d028718918 (patch)
tree1618e21e417e99af4a06db5a8abaf80feaa03684 /Source/Core/VideoCommon/PerformanceMetrics.cpp
parentc763961112f858732c1cad58e286d7a076ef7e5f (diff)
PerformanceTracker: Use SPSCQueue and atomic to eliminate need for a mutex. Clean up some math.
Diffstat (limited to 'Source/Core/VideoCommon/PerformanceMetrics.cpp')
-rw-r--r--Source/Core/VideoCommon/PerformanceMetrics.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/PerformanceMetrics.cpp b/Source/Core/VideoCommon/PerformanceMetrics.cpp
index 773dc44383..2a4928cd7e 100644
--- a/Source/Core/VideoCommon/PerformanceMetrics.cpp
+++ b/Source/Core/VideoCommon/PerformanceMetrics.cpp
@@ -48,6 +48,7 @@ void PerformanceMetrics::CountPerformanceMarker(Core::System& system, s64 cycles
{
std::unique_lock lock(m_time_lock);
m_speed_counter.Count();
+ m_speed_counter.UpdateStats();
m_real_times[m_time_index] = Clock::now() - m_time_sleeping;
m_cpu_times[m_time_index] = system.GetCoreTiming().GetCPUTimePoint(cyclesLate);
@@ -84,6 +85,9 @@ double PerformanceMetrics::GetLastSpeedDenominator() const
void PerformanceMetrics::DrawImGuiStats(const float backbuffer_scale)
{
+ m_vps_counter.UpdateStats();
+ m_fps_counter.UpdateStats();
+
const int movable_flag = Config::Get(Config::GFX_MOVABLE_PERFORMANCE_METRICS) ?
ImGuiWindowFlags_None :
ImGuiWindowFlags_NoMove;