RenderBase: send performance sample at every end of frame

Not the best integration point, but couldn't think of something better.
This implementation has the benefit to be super simple.
This commit is contained in:
Pierre Bourdon 2018-10-27 05:11:20 +02:00
parent 6a891ea37c
commit 83c3370c2a
1 changed files with 8 additions and 0 deletions

View File

@ -34,10 +34,12 @@
#include "Common/Thread.h" #include "Common/Thread.h"
#include "Common/Timer.h" #include "Common/Timer.h"
#include "Core/Analytics.h"
#include "Core/Config/SYSCONFSettings.h" #include "Core/Config/SYSCONFSettings.h"
#include "Core/ConfigManager.h" #include "Core/ConfigManager.h"
#include "Core/Core.h" #include "Core/Core.h"
#include "Core/FifoPlayer/FifoRecorder.h" #include "Core/FifoPlayer/FifoRecorder.h"
#include "Core/HW/SystemTimers.h"
#include "Core/HW/VideoInterface.h" #include "Core/HW/VideoInterface.h"
#include "Core/Host.h" #include "Core/Host.h"
#include "Core/Movie.h" #include "Core/Movie.h"
@ -698,6 +700,12 @@ void Renderer::Swap(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, const
m_fps_counter.Update(); m_fps_counter.Update();
DolphinAnalytics::PerformanceSample perf_sample;
perf_sample.speed_ratio = SystemTimers::GetEstimatedEmulationPerformance();
perf_sample.num_prims = stats.thisFrame.numPrims + stats.thisFrame.numDLPrims;
perf_sample.num_draw_calls = stats.thisFrame.numDrawCalls;
DolphinAnalytics::Instance()->ReportPerformanceInfo(std::move(perf_sample));
if (IsFrameDumping()) if (IsFrameDumping())
DumpCurrentFrame(); DumpCurrentFrame();