Implement profiler

This commit is contained in:
2019-05-14 15:03:14 +02:00
parent 3887b041f6
commit 702c37656f
5 changed files with 37 additions and 51 deletions

View File

@@ -8,12 +8,11 @@ class Profiler
{
public:
std::map<std::string, uint32_t> calls;
void record_function_call(char *function_name);
void record_function_call(const char *function_name);
void clear();
};
//#define PROFILER_RECORD profiler.record_function_call((char*) __func__)
#define PROFILER_RECORD
#define PROFILER_RECORD profiler.record_function_call(__func__)
extern Profiler profiler;