From 3b4e4003336c94527339a2a9ad7d52875974258f Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sun, 19 Feb 2017 18:35:04 -0800 Subject: Remove built-in (non-Microprofile) profiler --- src/common/profiler_reporting.h | 83 ----------------------------------------- 1 file changed, 83 deletions(-) delete mode 100644 src/common/profiler_reporting.h (limited to 'src/common/profiler_reporting.h') diff --git a/src/common/profiler_reporting.h b/src/common/profiler_reporting.h deleted file mode 100644 index e9ce6d41c..000000000 --- a/src/common/profiler_reporting.h +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2015 Citra Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#pragma once - -#include -#include -#include -#include "common/synchronized_wrapper.h" - -namespace Common { -namespace Profiling { - -using Clock = std::chrono::high_resolution_clock; -using Duration = Clock::duration; - -struct ProfilingFrameResult { - /// Time since the last delivered frame - Duration interframe_time; - - /// Time spent processing a frame, excluding VSync - Duration frame_time; -}; - -class ProfilingManager final { -public: - ProfilingManager(); - - /// This should be called after swapping screen buffers. - void BeginFrame(); - /// This should be called before swapping screen buffers. - void FinishFrame(); - - /// Get the timing results from the previous frame. This is updated when you call FinishFrame(). - const ProfilingFrameResult& GetPreviousFrameResults() const { - return results; - } - -private: - Clock::time_point last_frame_end; - Clock::time_point this_frame_start; - - ProfilingFrameResult results; -}; - -struct AggregatedDuration { - Duration avg, min, max; -}; - -struct AggregatedFrameResult { - /// Time since the last delivered frame - AggregatedDuration interframe_time; - - /// Time spent processing a frame, excluding VSync - AggregatedDuration frame_time; - - float fps; -}; - -class TimingResultsAggregator final { -public: - TimingResultsAggregator(size_t window_size); - - void Clear(); - - void AddFrame(const ProfilingFrameResult& frame_result); - - AggregatedFrameResult GetAggregatedResults() const; - - size_t max_window_size; - size_t window_size; - size_t cursor; - - std::vector interframe_times; - std::vector frame_times; -}; - -ProfilingManager& GetProfilingManager(); -SynchronizedRef GetTimingResultsAggregator(); - -} // namespace Profiling -} // namespace Common -- cgit v1.2.3