diff --git a/examples/testbed/framework/main.cpp b/examples/testbed/framework/main.cpp index 1ff1c07..bd498ff 100644 --- a/examples/testbed/framework/main.cpp +++ b/examples/testbed/framework/main.cpp @@ -137,12 +137,12 @@ static void Run() g_profiler->EndScope(); - g_recorderProfiler->BuildRecords(); + g_profilerRecorder->BuildRecords(); if (g_settings->drawProfile) { records.Resize(0); - g_recorderProfiler->BuildSortedRecords(records); + g_profilerRecorder->BuildSortedRecords(records); } g_profiler->End(); diff --git a/examples/testbed/framework/model.cpp b/examples/testbed/framework/model.cpp index f3f2c8c..325bfa0 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_recorderProfiler = &m_recorderProfiler; + g_profilerRecorder = &m_profilerRecorder; #if (PROFILE_JSON == 1) g_profilerListener = &m_jsonListener; @@ -56,7 +56,7 @@ Model::~Model() g_draw = nullptr; g_camera = nullptr; g_profiler = nullptr; - g_recorderProfiler = nullptr; + g_profilerRecorder = nullptr; #if (PROFILE_JSON == 1) g_profilerListener = nullptr; diff --git a/examples/testbed/framework/model.h b/examples/testbed/framework/model.h index 6371131..22dc4cc 100644 --- a/examples/testbed/framework/model.h +++ b/examples/testbed/framework/model.h @@ -21,10 +21,10 @@ #include #include -#include +#include // Set to 1 to write profile events into a .json file. Set to 0 otherwise. -#define PROFILE_JSON 1 +#define PROFILE_JSON 0 #if (PROFILE_JSON == 1) #include @@ -71,7 +71,7 @@ private: Draw m_draw; Camera m_camera; Profiler m_profiler; - RecorderProfiler m_recorderProfiler; + ProfilerRecorder m_profilerRecorder; #if (PROFILE_JSON == 1) JsonProfiler m_jsonListener; diff --git a/examples/testbed/framework/profiler.h b/examples/testbed/framework/profiler.h index aa70633..bcc978a 100644 --- a/examples/testbed/framework/profiler.h +++ b/examples/testbed/framework/profiler.h @@ -59,7 +59,7 @@ public: // End the top scope. void EndScope(); private: - friend class RecorderProfiler; + friend class ProfilerRecorder; ProfilerNode* CreateNode(); void DestroyNode(ProfilerNode* node); diff --git a/examples/testbed/framework/recorder_profiler.cpp b/examples/testbed/framework/profiler_recorder.cpp similarity index 86% rename from examples/testbed/framework/recorder_profiler.cpp rename to examples/testbed/framework/profiler_recorder.cpp index 143ab83..94b0dc7 100644 --- a/examples/testbed/framework/recorder_profiler.cpp +++ b/examples/testbed/framework/profiler_recorder.cpp @@ -16,12 +16,12 @@ * 3. This notice may not be removed or altered from any source distribution. */ -#include +#include #include -RecorderProfiler* g_recorderProfiler = nullptr; +ProfilerRecorder* g_profilerRecorder = nullptr; -ProfilerRecord* RecorderProfiler::FindRecord(const char* name) +ProfilerRecord* ProfilerRecorder::FindRecord(const char* name) { for (u32 i = 0; i < m_records.Count(); ++i) { @@ -34,7 +34,7 @@ ProfilerRecord* RecorderProfiler::FindRecord(const char* name) return nullptr; } -void RecorderProfiler::RecurseBuildRecords(ProfilerNode* node) +void ProfilerRecorder::RecurseBuildRecords(ProfilerNode* node) { ProfilerRecord* fr = FindRecord(node->name); if (fr) @@ -66,7 +66,7 @@ void RecorderProfiler::RecurseBuildRecords(ProfilerNode* node) } } -void RecorderProfiler::BuildRecords() +void ProfilerRecorder::BuildRecords() { for (u32 i = 0; i < m_records.Count(); ++i) { @@ -90,7 +90,7 @@ static ProfilerRecord* FindSortedRecord(b3Array& records, const return nullptr; } -void RecorderProfiler::RecurseBuildSortedRecords(ProfilerNode* node, b3Array& output) +void ProfilerRecorder::RecurseBuildSortedRecords(ProfilerNode* node, b3Array& output) { ProfilerRecord* fsr = FindSortedRecord(output, node->name); @@ -110,7 +110,7 @@ void RecorderProfiler::RecurseBuildSortedRecords(ProfilerNode* node, b3Array& output) +void ProfilerRecorder::BuildSortedRecords(b3Array& output) { assert(output.Count() == 0); diff --git a/examples/testbed/framework/recorder_profiler.h b/examples/testbed/framework/profiler_recorder.h similarity index 92% rename from examples/testbed/framework/recorder_profiler.h rename to examples/testbed/framework/profiler_recorder.h index 9d6eae6..b3ea5b4 100644 --- a/examples/testbed/framework/recorder_profiler.h +++ b/examples/testbed/framework/profiler_recorder.h @@ -16,8 +16,8 @@ * 3. This notice may not be removed or altered from any source distribution. */ -#ifndef RECORDER_PROFILER_H -#define RECORDER_PROFILER_H +#ifndef PROFILER_RECORDER_H +#define PROFILER_RECORDER_H #include #include @@ -35,7 +35,7 @@ struct ProfilerRecord }; // This class maintains persistent profiler records -class RecorderProfiler +class ProfilerRecorder { public: void BuildRecords(); @@ -53,6 +53,6 @@ private: b3StackArray m_records; // persistent profiler records }; -extern RecorderProfiler* g_recorderProfiler; +extern ProfilerRecorder* g_profilerRecorder; #endif \ No newline at end of file