Initial commit
This commit is contained in:
20
profiler.hpp
Normal file
20
profiler.hpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef PROFILER_HPP_
|
||||
#define PROFILER_HPP_
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
class Profiler
|
||||
{
|
||||
public:
|
||||
std::map<std::string, uint32_t> calls;
|
||||
void record_function_call(char *function_name);
|
||||
void clear();
|
||||
};
|
||||
|
||||
//#define PROFILER_RECORD profiler.record_function_call((char*) __func__)
|
||||
#define PROFILER_RECORD
|
||||
|
||||
extern Profiler profiler;
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user