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

Classes

struct  ProfilingContext
 thread context of profiling More...
 
struct  ProfilingScope
 
struct  ProfilingScopeLock
 convenience class used to automatically push and pop scopes 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 ()
 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 value)
 increment profiling counter
 
void ProfilingDecreaseCounter (const char *id, uint64 value)
 decrement profiling counter
 
const Util::Dictionary< const char *, uint64 > & ProfilingGetCounters ()
 return table of counters
 
void ProfilingSetupBudgetCounter (const char *id, uint64 budget)
 Setup a profiling budget counter.
 
void ProfilingBudgetIncreaseCounter (const char *id, uint64 value)
 Increment budget counter.
 
void ProfilingBudgetDecreaseCounter (const char *id, uint64 value)
 Decrement budget counter.
 
void ProfilingBudgetResetCounter (const char *id)
 Reset budget counter.
 
const Util::Dictionary< const char *, Util::Pair< uint64, uint64 > > & ProfilingGetBudgetCounters ()
 Return set of budget counters.
 

Variables

Util::Array< ProfilingContextprofilingContexts
 
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
 
thread_local IndexT ProfilingContextIndex = InvalidIndex
 
Threading::CriticalSection counterLock
 
Util::Dictionary< const char *, uint64counters
 
Util::Dictionary< const char *, Util::Pair< uint64, uint64 > > budgetCounters
 

Function Documentation

◆ ProfilingBudgetDecreaseCounter()

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

Decrement budget counter.

◆ ProfilingBudgetIncreaseCounter()

void Profiling::ProfilingBudgetIncreaseCounter ( const char * id,
uint64 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 value )

decrement profiling counter

◆ ProfilingGetBudgetCounters()

const Util::Dictionary< const char *, Util::Pair< uint64, uint64 > > & 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 > & 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 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 ( )

register a new thread for the profiling

◆ ProfilingSetupBudgetCounter()

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

Setup a profiling budget counter.

Variable Documentation

◆ budgetCounters

Util::Dictionary< const char *, Util::Pair< uint64, uint64 > > 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 > Profiling::counters

◆ ProfilingContextCounter

Threading::AtomicCounter Profiling::ProfilingContextCounter = 0

atomic counter used to give each thread a unique id

◆ ProfilingContextIndex

thread_local IndexT Profiling::ProfilingContextIndex = InvalidIndex

◆ profilingContexts

Util::Array< ProfilingContext > Profiling::profilingContexts

◆ scopesByCategory

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