Nebula
Loading...
Searching...
No Matches
profiling.cc File Reference

Namespaces

namespace  Profiling

Functions

void Profiling::ProfilingPushScope (const ProfilingScope &scope)
 push scope to scope stack
void Profiling::ProfilingPopScope ()
 pop scope from scope stack
void Profiling::ProfilingNewFrame ()
 pushes an 'end of frame' marker, only available on the main thread
Timing::Time Profiling::ProfilingGetTime ()
 get current frametime
void Profiling::ProfilingRegisterThread (int priority=0)
 register a new thread for the profiling
const Util::Array< ProfilingScope > & Profiling::ProfilingGetScopes (Threading::ThreadId thread)
 get all top level scopes based on thread, only run when you know the thread is finished
const Util::Array< ProfilingContextProfiling::ProfilingGetContexts ()
 get all profiling contexts
void Profiling::ProfilingClear ()
 clear all scopes
void Profiling::ProfilingIncreaseCounter (const char *id, uint64_t value)
 increment profiling counter
void Profiling::ProfilingDecreaseCounter (const char *id, uint64_t value)
 decrement profiling counter
const Util::Dictionary< const char *, uint64_t > & Profiling::ProfilingGetCounters ()
 return table of counters
void Profiling::ProfilingSetupBudgetCounter (const char *id, uint64_t budget)
 Setup a profiling budget counter.
void Profiling::ProfilingBudgetIncreaseCounter (const char *id, uint64_t value)
 Increment budget counter.
void Profiling::ProfilingBudgetDecreaseCounter (const char *id, uint64_t value)
 Decrement budget counter.
void Profiling::ProfilingBudgetResetCounter (const char *id)
 Reset budget counter.
const Util::Dictionary< const char *, Util::Pair< uint64_t, uint64_t > > & Profiling::ProfilingGetBudgetCounters ()
 Return set of budget counters.

Variables

Util::Array< ProfilingContextProfiling::profilingContexts
Util::Array< ProfilingContextProfiling::profilingContextsLastFrame
Util::Array< Threading::CriticalSection * > Profiling::contextMutexes
Util::Dictionary< Util::StringAtom, Util::Array< ProfilingScope > > Profiling::scopesByCategory
Threading::CriticalSection Profiling::categoryLock
Threading::AtomicCounter Profiling::ProfilingContextCounter = 0
 atomic counter used to give each thread a unique id
IndexT Profiling::ProfilingContextIndex = InvalidIndex
Threading::CriticalSection Profiling::counterLock
Util::Dictionary< const char *, uint64_t > Profiling::counters
Util::Dictionary< const char *, Util::Pair< uint64_t, uint64_t > > Profiling::budgetCounters