diff --git a/examples/testbed/framework/main.cpp b/examples/testbed/framework/main.cpp index f47c194..749c6f1 100644 --- a/examples/testbed/framework/main.cpp +++ b/examples/testbed/framework/main.cpp @@ -120,7 +120,7 @@ static void Run() if (g_settings->drawProfile) { - const b3Array& records = g_profilerRecorder->GetRecords(); + const b3Array& records = g_recorderProfiler->GetRecords(); for (u32 i = 0; i < records.Count(); ++i) { const ProfilerRecord& r = records[i]; diff --git a/examples/testbed/framework/model.cpp b/examples/testbed/framework/model.cpp index df07d7f..37c9aab 100644 --- a/examples/testbed/framework/model.cpp +++ b/examples/testbed/framework/model.cpp @@ -26,7 +26,7 @@ Model::Model() g_draw = &m_draw; g_camera = &m_camera; g_profiler = &m_profiler; - g_profilerRecorder = &m_profilerListener.m_recorderListener; + g_recorderProfiler = &m_profilerListener.m_recorderListener; g_profilerListener = &m_profilerListener; m_test = nullptr; @@ -53,7 +53,7 @@ Model::~Model() g_draw = nullptr; g_camera = nullptr; g_profiler = nullptr; - g_profilerRecorder = nullptr; + g_recorderProfiler = nullptr; g_profilerListener = nullptr; delete m_test; diff --git a/examples/testbed/framework/model.h b/examples/testbed/framework/model.h index 310e6f2..2580055 100644 --- a/examples/testbed/framework/model.h +++ b/examples/testbed/framework/model.h @@ -20,7 +20,7 @@ #define MODEL_H #include -#include +#include class Test; @@ -63,7 +63,7 @@ private: Draw m_draw; Camera m_camera; Profiler m_profiler; - TestbedListener m_profilerListener; + TestbedProfiler m_profilerListener; Test* m_test; bool m_setTest; bool m_pause; diff --git a/examples/testbed/framework/recorder_profiler.cpp b/examples/testbed/framework/recorder_profiler.cpp index 016dbf0..4edfaed 100644 --- a/examples/testbed/framework/recorder_profiler.cpp +++ b/examples/testbed/framework/recorder_profiler.cpp @@ -18,7 +18,7 @@ #include -RecorderProfiler* g_profilerRecorder = nullptr; +RecorderProfiler* g_recorderProfiler = nullptr; void RecorderProfiler::BeginEvents() { diff --git a/examples/testbed/framework/recorder_profiler.h b/examples/testbed/framework/recorder_profiler.h index f7b1fde..3934ae7 100644 --- a/examples/testbed/framework/recorder_profiler.h +++ b/examples/testbed/framework/recorder_profiler.h @@ -46,14 +46,14 @@ public: void EndEvent(const char* name, float64 time); - ProfilerRecord* FindRecord(const char* name); - const b3Array& GetRecords() const { return m_records; } private: + ProfilerRecord* FindRecord(const char* name); + b3StackArray m_records; // persistent records sorted by call order u32 m_call; }; -extern RecorderProfiler* g_profilerRecorder; +extern RecorderProfiler* g_recorderProfiler; #endif \ No newline at end of file diff --git a/examples/testbed/framework/testbed_listener.h b/examples/testbed/framework/testbed_profiler.h similarity index 94% rename from examples/testbed/framework/testbed_listener.h rename to examples/testbed/framework/testbed_profiler.h index 9545384..0e19f3b 100644 --- a/examples/testbed/framework/testbed_listener.h +++ b/examples/testbed/framework/testbed_profiler.h @@ -22,7 +22,7 @@ #include #include -// Set to 1 then the testbed listener will write profile events into a .json file. +// Set to 1 then the testbed profiler will write profile events into a .json file. // Set to 0 otherwise. #define PROFILE_JSON 0 @@ -30,8 +30,7 @@ #include #endif - -class TestbedListener : public ProfilerListener +class TestbedProfiler : public ProfilerListener { public: void BeginEvents() override