VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Attributes
makVrf::DtProfileManager Class Reference

The profile manager responsible for all profiling. More...

Classes

struct  DtThreadProfileData

Public Types

typedef std::map< std::string,
DtColumnLogger * > 
LoggerMap

Public Member Functions

 DtProfileManager ()
bool enabled () const
void setEnabled (bool)
DtProfileTimestamp startProfile (const char *name, DtProfileNode::Attributes)
 begin a profile. This function is thread safe
DtProfileTimestamp startProfile (const std::string &name, DtProfileNode::Attributes)
void stopProfile (const DtProfileTimestamp &)
 begin stop a profile. This function is thread safe
DtUInt64 getTime ()
 Get a timestamp in CPU ticks. This function is thread safe.
void reset ()
 reset the entire tree
void incrementFrameCounter ()
 increments the frame counter.
int frameCountSinceReset ()
 get the number of frames since reset
DtUInt64 timeSinceReset ()
 get the number of ticks since reset
double averageFps ()
 get the average frames per second over the last second
double instantFps ()
 get the instantaneous frames per second
double instantFrameTime ()
 get the frame time in milliseconds
double averageFrameTime ()
DtProfileIteratorprofileIterator ()
 create a profile iterator
void releaseIterator (DtProfileIterator *iterator)
 release a profile iterator
DtColumnLoggerlogger (std::string=std::string())
void printLoggers (bool paused, double dT, double simTime, double realTime)
void printExtraInfo (const std::string &)
DtThreadProfileDatagetCurrentProfileNode (DtProfileNode *=0)
 get the profiler data for a particular thread
const chargetString (const std::string &)
void rollover (const std::string &tag)

Static Public Member Functions

static DtProfileManagerInstance ()

Private Types

typedef tbb::spin_rw_mutex StringSetMutex
typedef boost::unordered_set
< std::string > 
StringSet

Private Attributes

tbb::concurrent_vector
< DtThreadProfileData * > 
theThreadProfileData
bool myEnabledFlag
bool theShouldReset
int theFrameCounter
DtUInt64 theResetTime
DtUInt64 thePreviousFrame
DtUInt64theFrameTimes
int theFrameTimeIndex
LoggerMap myLoggers
std::string myTag
StringSetMutex myStringsMutex
StringSet myStrings
DtProfileNode theRoot

Detailed Description

The profile manager responsible for all profiling.

Member Typedef Documentation

typedef std::map<std::string, DtColumnLogger*> makVrf::DtProfileManager::LoggerMap
typedef tbb::spin_rw_mutex makVrf::DtProfileManager::StringSetMutex
private
typedef boost::unordered_set<std::string> makVrf::DtProfileManager::StringSet
private

Constructor & Destructor Documentation

makVrf::DtProfileManager::DtProfileManager ( )

Member Function Documentation

static DtProfileManager& makVrf::DtProfileManager::Instance ( )
static
bool makVrf::DtProfileManager::enabled ( ) const
void makVrf::DtProfileManager::setEnabled ( bool  )
DtProfileTimestamp makVrf::DtProfileManager::startProfile ( const char name,
DtProfileNode::Attributes   
)

begin a profile. This function is thread safe

DtProfileTimestamp makVrf::DtProfileManager::startProfile ( const std::string &  name,
DtProfileNode::Attributes   
)
void makVrf::DtProfileManager::stopProfile ( const DtProfileTimestamp )

begin stop a profile. This function is thread safe

DtUInt64 makVrf::DtProfileManager::getTime ( )

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

void makVrf::DtProfileManager::reset ( )

reset the entire tree

void makVrf::DtProfileManager::incrementFrameCounter ( )

increments the frame counter.

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

int makVrf::DtProfileManager::frameCountSinceReset ( )
inline

get the number of frames since reset

DtUInt64 makVrf::DtProfileManager::timeSinceReset ( )

get the number of ticks since reset

double makVrf::DtProfileManager::averageFps ( )

get the average frames per second over the last second

double makVrf::DtProfileManager::instantFps ( )

get the instantaneous frames per second

double makVrf::DtProfileManager::instantFrameTime ( )

get the frame time in milliseconds

double makVrf::DtProfileManager::averageFrameTime ( )
DtProfileIterator* makVrf::DtProfileManager::profileIterator ( )

create a profile iterator

void makVrf::DtProfileManager::releaseIterator ( DtProfileIterator iterator)

release a profile iterator

DtColumnLogger& makVrf::DtProfileManager::logger ( std::string  = std::string())
void makVrf::DtProfileManager::printLoggers ( bool  paused,
double  dT,
double  simTime,
double  realTime 
)
void makVrf::DtProfileManager::printExtraInfo ( const std::string &  )
DtThreadProfileData* makVrf::DtProfileManager::getCurrentProfileNode ( DtProfileNode = 0)

get the profiler data for a particular thread

const char* makVrf::DtProfileManager::getString ( const std::string &  )
void makVrf::DtProfileManager::rollover ( const std::string &  tag)

Member Data Documentation

tbb::concurrent_vector<DtThreadProfileData*> makVrf::DtProfileManager::theThreadProfileData
private
bool makVrf::DtProfileManager::myEnabledFlag
private
bool makVrf::DtProfileManager::theShouldReset
private
int makVrf::DtProfileManager::theFrameCounter
private
DtUInt64 makVrf::DtProfileManager::theResetTime
private
DtUInt64 makVrf::DtProfileManager::thePreviousFrame
private
DtUInt64* makVrf::DtProfileManager::theFrameTimes
private
int makVrf::DtProfileManager::theFrameTimeIndex
private
LoggerMap makVrf::DtProfileManager::myLoggers
private
std::string makVrf::DtProfileManager::myTag
private
StringSetMutex makVrf::DtProfileManager::myStringsMutex
mutableprivate
StringSet makVrf::DtProfileManager::myStrings
private
DtProfileNode makVrf::DtProfileManager::theRoot
private

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

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)