46 m_counters.at(ref.
id).ctr.fetch_add(amount);
52 m_counters.at(ref.
id).ctr.fetch_sub(amount);
58 m_counters.at(ref.
id).ctr.store(value);
64 m_counters.at(ref.
id).ctr.store(0);
79 ctr(0), resetOnNewFrame(reset){};
81 mutable std::atomic<uint32_t> ctr;
86 std::map<std::size_t, Counter> m_counters;
91 bool m_neverReset =
false;
94 std::map<std::size_t, std::string> m_definedCounters;
97 std::mutex m_counterMutex;
99 std::hash<std::string> m_strHashFn;
Definition PerfStats.h:24
void CounterAdd(CounterRef ref, uint32_t amount=1) const
Definition PerfStats.h:43
void CounterReset(CounterRef ref) const
Definition PerfStats.h:61
void CounterDec(CounterRef ref, uint32_t amount=1) const
Definition PerfStats.h:49
const FrameInfo & GetFrameStats() const
Definition PerfStats.h:69
CounterRef GetOrCreateCounter(std::string name, bool resetOnNewFrame=true)
Definition PerfStats.cpp:13
void CounterSet(CounterRef ref, uint32_t value) const
Definition PerfStats.h:55
std::string GetNameForCounter(CounterRef ref) const
Definition PerfStats.h:71
std::map< std::string, uint32_t > FrameInfo
Definition PerfStats.h:26
void FlushFrame()
Definition PerfStats.cpp:32
void EnableReset(bool enabled)
Definition PerfStats.h:67
Definition PerfStats.h:15
Definition PerfStats.h:29
CounterRef(std::nullptr_t)
Definition PerfStats.h:31
size_t id
Definition PerfStats.h:33