Nebula
Loading...
Searching...
No Matches
Profiling Namespace Reference

Classes

struct  ProfilingScope
struct  ProfilingScopeLock
 convenience class used to automatically push and pop scopes More...
struct  ProfilingContext
 thread context of profiling More...

Functions

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

Variables

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

Function Documentation

◆ ProfilingBudgetDecreaseCounter()

void Profiling::ProfilingBudgetDecreaseCounter ( const char * id,
uint64_t value )

Decrement budget counter.

◆ ProfilingBudgetIncreaseCounter()

void Profiling::ProfilingBudgetIncreaseCounter ( const char * id,
uint64_t value )

Increment budget counter.

◆ ProfilingBudgetResetCounter()

void Profiling::ProfilingBudgetResetCounter ( const char * id)

Reset budget counter.

◆ ProfilingClear()

void Profiling::ProfilingClear ( )

clear all scopes

◆ ProfilingDecreaseCounter()

void Profiling::ProfilingDecreaseCounter ( const char * id,
uint64_t value )

decrement profiling counter

◆ ProfilingGetBudgetCounters()

const Util::Dictionary< const char *, Util::Pair< uint64_t, uint64_t > > & Profiling::ProfilingGetBudgetCounters ( )

Return set of budget counters.

◆ ProfilingGetContexts()

const Util::Array< ProfilingContext > Profiling::ProfilingGetContexts ( )

get all profiling contexts

◆ ProfilingGetCounters()

const Util::Dictionary< const char *, uint64_t > & Profiling::ProfilingGetCounters ( )

return table of counters

◆ ProfilingGetScopes()

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

◆ ProfilingGetTime()

Timing::Time Profiling::ProfilingGetTime ( )

get current frametime

◆ ProfilingIncreaseCounter()

void Profiling::ProfilingIncreaseCounter ( const char * id,
uint64_t value )

increment profiling counter

◆ ProfilingNewFrame()

void Profiling::ProfilingNewFrame ( )

pushes an 'end of frame' marker, only available on the main thread

◆ ProfilingPopScope()

void Profiling::ProfilingPopScope ( )

pop scope from scope stack

◆ ProfilingPushScope()

void Profiling::ProfilingPushScope ( const ProfilingScope & scope)

push scope to scope stack

◆ ProfilingRegisterThread()

void Profiling::ProfilingRegisterThread ( int priority)

register a new thread for the profiling

◆ ProfilingSetupBudgetCounter()

void Profiling::ProfilingSetupBudgetCounter ( const char * id,
uint64_t budget )

Setup a profiling budget counter.

Variable Documentation

◆ budgetCounters

Util::Dictionary< const char *, Util::Pair< uint64_t, uint64_t > > Profiling::budgetCounters

◆ categoryLock

Threading::CriticalSection Profiling::categoryLock

◆ contextMutexes

Util::Array< Threading::CriticalSection * > Profiling::contextMutexes

◆ counterLock

Threading::CriticalSection Profiling::counterLock

◆ counters

Util::Dictionary< const char *, uint64_t > Profiling::counters

◆ ProfilingContextCounter

Threading::AtomicCounter Profiling::ProfilingContextCounter = 0

atomic counter used to give each thread a unique id

◆ ProfilingContextIndex

IndexT Profiling::ProfilingContextIndex = InvalidIndex
thread_local

◆ profilingContexts

Util::Array< ProfilingContext > Profiling::profilingContexts

◆ profilingContextsLastFrame

Util::Array<ProfilingContext> Profiling::profilingContextsLastFrame

◆ scopesByCategory

Util::Dictionary< Util::StringAtom, Util::Array< ProfilingScope > > Profiling::scopesByCategory