#ifndef _PROFILER_H
#define _PROFILER_H
+#include <stdint.h>
#include <map>
#include <string>
#include <stack>
class Profiler
{
public:
- Profiler() {}
+ Profiler() : m_enabled(false) {}
void BeginZone(std::string name);
void EndZone();
void EndFrame();
+
+ void Enable(bool enabled) { m_enabled = enabled; }
+
+ void AddCounter(std::string name, uint64_t amt);
private:
struct ProfileZone
{
};
std::map<std::string, ProfileZone> m_zones;
+ std::map<std::string, uint64_t> m_counters;
std::stack<std::string> m_zone_stack;
+ bool m_enabled;
};
extern Profiler g_profiler;