9 #define PROFILE_SCOPE(name) IPDF::ProfilerScope _localProfZone(name)
16 Profiler() : m_enabled(false) {}
18 void BeginZone(std::string name);
23 void Enable(bool enabled) { m_enabled = enabled; }
25 void AddCounter(std::string name, uint64_t amt);
37 std::map<std::string, ProfileZone> m_zones;
38 std::map<std::string, uint64_t> m_counters;
39 std::stack<std::string> m_zone_stack;
43 extern Profiler g_profiler;
46 ProfilerScope(std::string name) { g_profiler.BeginZone(name); }
47 ~ProfilerScope() { g_profiler.EndZone(); }