VR-Forces Developer's Guide
 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.

Public Member Functions

 DtInMemoryProfiler ()
 
 ~DtInMemoryProfiler ()
 
void init (std::size_t numOfSamples, const std::string &fileName)
 
std::size_t numSamples () const
 
void start ()
 
void stop ()
 
void reset ()
 
bool dumped () const
 
void dump ()
 
bool valid () const
 

Static Public Member Functions

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

Protected Member Functions

void dumpStats ()
 

Protected Attributes

DtTimedSectionmyTimer
 
DtSampleAggregatormyAggregator
 
bool myStarted
 

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 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)