VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Static Public Member Functions | Static Private Member Functions | Static Private Attributes | Friends
makVrv::DtProfileManager Class Reference

The profile manager responsible for all profiling.

Classes

class  Initializer
 

Public Types

enum  ClientFlags { F3_STATS_OVERLAY = 0x00000001, IMGUI_OVERLAY = 0x00000010 }
 

Static Public Member Functions

static void init ()
 
static void startProfile (const char *name)
 
static void stopProfile ()
 
static void startPerformanceStat (const char *name)
 
static void stopPerformanceStat ()
 
static void getTime (DtUInt64 &time)
 
static void reset ()
 
static void incrementFrameCounter ()
 
static int frameCountSinceReset ()
 
static DtUInt64 timeSinceReset ()
 
static DtUInt64 ticksPerSecond ()
 
static double averageFps ()
 
static double instantFps ()
 
static double lowestFps ()
 
static double instantFrameTime ()
 
static double averageFrameTime ()
 
static double highestFrameTime ()
 
static DtProfileIteratorprofileIterator ()
 
static DtProfileNodetheRootNode ()
 
static DtProfileIteratorstatIterator ()
 
static void releaseIterator (DtProfileIterator *iterator)
 
static bool collectTracyStats ()
 
static bool collectTracyGpuStats ()
 
static void setCollectTracyStats (bool val)
 
static void setCollectTracyGpuStats (bool val)
 
static void setTracyProfilerInitialized (bool val)
 
static bool tracyProfilerInitialized ()
 
static int threadCount ()
 
static DtThreadProfileData * threadData (int i)
 
static void addClientFlag (int flag)
 
static void removeClientFlag (int flag)
 
static int clientFlags ()
 

Static Private Member Functions

static DtThreadProfileData * getCurrentProfileNode ()
 
static DtThreadProfileData * getCurrentPerformanceStatNode ()
 

Static Private Attributes

static Initializer theInitializer
 
static DtProfileNode theRoot
 
static DtProfileNode thePerformanceStatRoot
 
static bool theShouldReset
 
static int theFrameCounter
 
static DtUInt64 theResetTime
 
static DtUInt64 thePreviousFrame
 
static DtUInt64theFrameTimes
 
static DtUInt64 theMaxFrameTime
 
static int theFrameTimeIndex
 
static bool theInitializationDone
 
static int thePreInitClientFlags
 
static int theClientFlags
 
static bool theCollectTracyStats
 
static bool theCollectGpuTracyStats
 
static bool theTracyProfilerInitialized
 

Friends

class Initializer
 

Member Enumeration Documentation

Enumerator
F3_STATS_OVERLAY 
IMGUI_OVERLAY 

Member Function Documentation

static void makVrv::DtProfileManager::init ( )
static

Set up the profile manager (cpu count per second, etc.)

static void makVrv::DtProfileManager::addClientFlag ( int  flag)
static

Clients who use the profile manager must register and unregister themselves. If no clients are registered, startProfile will return immediately so there's no overhead of generating profiles when nobody is using the data. Clients should register with addClientFlag before any calls to startProfile or startPerformanceStat and must unregister with removeClientFlag once they are done collecting stats. In most cases can be done at client initialization and destruction time.

static void makVrv::DtProfileManager::removeClientFlag ( int  flag)
static

Clients who use the profile manager must register and unregister themselves. If no clients are registered, startProfile will return immediately so there's no overhead of generating profiles when nobody is using the data. Clients should register with addClientFlag before any calls to startProfile or startPerformanceStat and must unregister with removeClientFlag once they are done collecting stats. In most cases can be done at client initialization and destruction time.

static int makVrv::DtProfileManager::clientFlags ( )
static

Clients who use the profile manager must register and unregister themselves. If no clients are registered, startProfile will return immediately so there's no overhead of generating profiles when nobody is using the data. Clients should register with addClientFlag before any calls to startProfile or startPerformanceStat and must unregister with removeClientFlag once they are done collecting stats. In most cases can be done at client initialization and destruction time.

static void makVrv::DtProfileManager::startProfile ( const char name)
static

begin a profile. This function is thread safe

Referenced by makVrv::DtProfileSample::DtProfileSample(), and makVrv::DtProfileTarget< true >::DtProfileTarget().

static void makVrv::DtProfileManager::stopProfile ( )
static

begin stop a profile. This function is thread safe

Referenced by makVrv::DtProfileSample::~DtProfileSample(), and makVrv::DtProfileTarget< true >::~DtProfileTarget().

static void makVrv::DtProfileManager::startPerformanceStat ( const char name)
static

begin a performance stat. This function is thread safe

Referenced by makVrv::DtPerfomanceStatSample::DtPerfomanceStatSample().

static void makVrv::DtProfileManager::stopPerformanceStat ( )
static

begin stop a profile. This function is thread safe

Referenced by makVrv::DtPerfomanceStatSample::~DtPerfomanceStatSample().

static void makVrv::DtProfileManager::getTime ( DtUInt64 time)
static

Get a timestamp in CPU ticks. This function is thread safe.

static void makVrv::DtProfileManager::reset ( )
static

reset the entire tree

static void makVrv::DtProfileManager::incrementFrameCounter ( )
static

increments the frame counter. This needs to be called once per frame from the main thread in order to compute time/frame correctly

static int makVrv::DtProfileManager::frameCountSinceReset ( )
inlinestatic

get the number of frames since reset

static DtUInt64 makVrv::DtProfileManager::timeSinceReset ( )
static

get the number of ticks since reset

static DtUInt64 makVrv::DtProfileManager::ticksPerSecond ( )
static

get the number of ticks per second

static double makVrv::DtProfileManager::averageFps ( )
static

get the average frames per second over the last second

static double makVrv::DtProfileManager::instantFps ( )
static

get the instantaneous frames per second

static double makVrv::DtProfileManager::lowestFps ( )
static

lowest fps seen since reset

static double makVrv::DtProfileManager::instantFrameTime ( )
static

get the frame time in milliseconds

static double makVrv::DtProfileManager::averageFrameTime ( )
static
static double makVrv::DtProfileManager::highestFrameTime ( )
static
static DtProfileIterator* makVrv::DtProfileManager::profileIterator ( )
static

create a profile iterator

static DtProfileNode* makVrv::DtProfileManager::theRootNode ( )
inlinestatic

tree root access for imgui

static DtProfileIterator* makVrv::DtProfileManager::statIterator ( )
static

create a performance stat iterator

static void makVrv::DtProfileManager::releaseIterator ( DtProfileIterator iterator)
static

release a profile iterator

static bool makVrv::DtProfileManager::collectTracyStats ( )
inlinestatic

are tracy stats active

static bool makVrv::DtProfileManager::collectTracyGpuStats ( )
inlinestatic
static void makVrv::DtProfileManager::setCollectTracyStats ( bool  val)
inlinestatic

set if stats are active

static void makVrv::DtProfileManager::setCollectTracyGpuStats ( bool  val)
inlinestatic
static void makVrv::DtProfileManager::setTracyProfilerInitialized ( bool  val)
inlinestatic
static bool makVrv::DtProfileManager::tracyProfilerInitialized ( )
inlinestatic
static int makVrv::DtProfileManager::threadCount ( )
static
static DtThreadProfileData* makVrv::DtProfileManager::threadData ( int  i)
static
static DtThreadProfileData* makVrv::DtProfileManager::getCurrentProfileNode ( )
staticprivate

get the profiler data for a particular thread

static DtThreadProfileData* makVrv::DtProfileManager::getCurrentPerformanceStatNode ( )
staticprivate

Friends And Related Function Documentation

friend class Initializer
friend

Member Data Documentation

Initializer makVrv::DtProfileManager::theInitializer
staticprivate
DtProfileNode makVrv::DtProfileManager::theRoot
staticprivate
DtProfileNode makVrv::DtProfileManager::thePerformanceStatRoot
staticprivate
bool makVrv::DtProfileManager::theShouldReset
staticprivate
int makVrv::DtProfileManager::theFrameCounter
staticprivate
DtUInt64 makVrv::DtProfileManager::theResetTime
staticprivate
DtUInt64 makVrv::DtProfileManager::thePreviousFrame
staticprivate
DtUInt64* makVrv::DtProfileManager::theFrameTimes
staticprivate
DtUInt64 makVrv::DtProfileManager::theMaxFrameTime
staticprivate
int makVrv::DtProfileManager::theFrameTimeIndex
staticprivate
bool makVrv::DtProfileManager::theInitializationDone
staticprivate
int makVrv::DtProfileManager::thePreInitClientFlags
staticprivate
int makVrv::DtProfileManager::theClientFlags
staticprivate
bool makVrv::DtProfileManager::theCollectTracyStats
staticprivate
bool makVrv::DtProfileManager::theCollectGpuTracyStats
staticprivate
bool makVrv::DtProfileManager::theTracyProfilerInitialized
staticprivate

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)