![]() |
VR-Forces 5.0.2 Developer's Guide
|
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 | |
| DtTimedSection * | myTimer |
| DtSampleAggregator * | myAggregator |
| bool | myStarted |
| 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.
|
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.
|
protected |
dump the min/max/and average
|
protected |
|
protected |
|
protected |