6 #include "FrameProfileFactory.h"
7 #include "ProfileRecordFactory.h"
15 #if !defined(NDEBUG) || defined(EMSCRIPTEN)
16 #define PROFILER_ENABLED 1
18 #define PROFILER_ENABLED 0
43 void Begin(
const std::string& name);
44 void End(
const std::string& end);
47 const int GetNumberOfSamples()
const {
return static_cast<int>(m_profilesPerFrame.size()); }
52 void SetEnabled(
bool enabled) { m_enabled = enabled; }
53 bool IsEnabled()
const {
return m_enabled; }
57 std::deque<FrameProfile*> m_profilesPerFrame;
58 std::stack<ProfileRecord*> m_currentProfileRecord;
68 int m_recordsThisFrame;
76 void Begin(
const std::string& name) {;}
77 void End(
const std::string& end) {;}
80 const size_t GetNumberOfSamples()
const {
return 0; }
81 const FrameProfile& GetFrameProfile(
int index)
const { Eegeo_ASSERT(
false);
return m_emptyFrameProfile; }
83 ProfileResults GetProfileResults(
const std::string& name)
const {
return m_emptyProfileResults; }
85 void SetEnabled(
bool enabled) { ; }
86 bool IsEnabled()
const {
return false; }
89 FrameProfile m_emptyFrameProfile;
90 ProfileResults m_emptyProfileResults;