VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtInMemoryProfiler Class Reference

This class measures time difference (cpu time, wall time, etc) between calls to its start and stop function. More...

Public Member Functions

 DtInMemoryProfiler ()
 CTOR Max number of samples to be collected must be provided up front, so that mem allocations don't take up profiling time. More...
 
 ~DtInMemoryProfiler ()
 DTOR. More...
 
void init (std::size_t numOfSamples, const std::string &fileName)
 
std::size_t numSamples () const
 Max number of samples that the profiler can profile. More...
 
void start ()
 Start profiling (a given frame) More...
 
void stop ()
 Stop profiling (a given frame) More...
 
void reset ()
 discard current samples profiled (e.g. to start profiling anew) More...
 
bool dumped () const
 were stats dumped already? This can happen if the number of samples to be collected exceed the capacity More...
 
void dump ()
 
bool valid () const
 Is profiler valid. More...
 

Static Public Member Functions

static std::size_t calculateNumberOfSamples (float estimatedFrequency, float estimatedRunTimeSeconds)
 Utility function: Given an approximate frequency and a run time in seconds will compute the upper bound on the number of samples needed. More...
 

Protected Member Functions

void dumpStats ()
 dump the min/max/and average More...
 

Protected Attributes

DtTimedSection * myTimer
 
DtSampleAggregatormyAggregator
 
bool myStarted
 

Detailed Description

This class measures time difference (cpu time, wall time, etc) between calls to its start and stop function.

Constructor & Destructor Documentation

makVrv::DtInMemoryProfiler::DtInMemoryProfiler ( )

CTOR Max number of samples to be collected must be provided up front, so that mem allocations don't take up profiling time.

makVrv::DtInMemoryProfiler::~DtInMemoryProfiler ( )

DTOR.

Member Function Documentation

static std::size_t makVrv::DtInMemoryProfiler::calculateNumberOfSamples ( float  estimatedFrequency,
float  estimatedRunTimeSeconds 
)
static

Utility function: Given an approximate frequency and a run time in seconds will compute the upper bound on the number of samples needed.

void makVrv::DtInMemoryProfiler::init ( std::size_t  numOfSamples,
const std::string &  fileName 
)
std::size_t makVrv::DtInMemoryProfiler::numSamples ( ) const

Max number of samples that the profiler can profile.

void makVrv::DtInMemoryProfiler::start ( )

Start profiling (a given frame)

void makVrv::DtInMemoryProfiler::stop ( )

Stop profiling (a given frame)

void makVrv::DtInMemoryProfiler::reset ( )

discard current samples profiled (e.g. to start profiling anew)

bool makVrv::DtInMemoryProfiler::dumped ( ) const

were stats dumped already? This can happen if the number of samples to be collected exceed the capacity

void makVrv::DtInMemoryProfiler::dump ( )
bool makVrv::DtInMemoryProfiler::valid ( ) const

Is profiler valid.

Will be false if it cannot allocate memory for requested number of samples or if the dump file cannot be written to, etc

void makVrv::DtInMemoryProfiler::dumpStats ( )
protected

dump the min/max/and average

Member Data Documentation

DtTimedSection* makVrv::DtInMemoryProfiler::myTimer
protected
DtSampleAggregator* makVrv::DtInMemoryProfiler::myAggregator
protected
bool makVrv::DtInMemoryProfiler::myStarted
protected

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)