Files
open_pit/profiler.hpp

21 lines
363 B
C++

#ifndef PROFILER_HPP_
#define PROFILER_HPP_
#include <string>
#include <map>
class Profiler
{
public:
std::map<std::string, uint32_t> calls;
void record_function_call(const char *function_name);
void reset();
bool command_line(const std::string &input);
};
#define PROFILER_RECORD profiler.record_function_call(__func__)
extern Profiler profiler;
#endif