![]() |
Pioneer
|
#include <PerfStats.h>

Classes | |
| struct | CounterRef |
Public Types | |
| using | FrameInfo = std::map< std::string, uint32_t > |
Public Member Functions | |
| CounterRef | GetOrCreateCounter (std::string name, bool resetOnNewFrame=true) |
| void | CounterAdd (CounterRef ref, uint32_t amount=1) const |
| void | CounterDec (CounterRef ref, uint32_t amount=1) const |
| void | CounterSet (CounterRef ref, uint32_t value) const |
| void | CounterReset (CounterRef ref) const |
| void | EnableReset (bool enabled) |
| const FrameInfo & | GetFrameStats () const |
| std::string | GetNameForCounter (CounterRef ref) const |
| void | FlushFrame () |
Simple atomic counter implementation for performance counters.
Create counters by calling auto ref = stats->GetOrCreateCounter("Triangles Drawn"). Once you have a counter reference, you can call stats->CounterAdd(ref, 12) to update the counter. The Counter* functions are thread-safe so long as they are called with a proper CounterRef. Call FlushFrame() to collate all stats from the current frame and write them to the frame cache.
| using Perf::Stats::FrameInfo = std::map<std::string, uint32_t> |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void Stats::FlushFrame | ( | ) |

|
inline |
|
inline |
| Stats::CounterRef Stats::GetOrCreateCounter | ( | std::string | name, |
| bool | resetOnNewFrame = true |
||
| ) |