DataDirector API
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DDD_PerformanceMonitor Class Reference

Performance monitor class; profiles an individual task. More...

#include <DDD_PerformanceMonitor.h>

Public Member Functions

std::string & Name ()
 
void StartMeasurement ()
 
void FinishMeasurement ()
 
INT_64 LastPerformanceSample ()
 

Protected Member Functions

 DDD_PerformanceMonitor (std::string &name)
 

Protected Attributes

Timer _timer
 
std::string _name
 
INT_64 _sample
 
bool _started
 

Detailed Description

Performance monitor class; profiles an individual task.

Constructor & Destructor Documentation

DDD_PerformanceMonitor ( std::string &  name)
protected

Constructor

Parameters
nameThe name of the performance monitor to create. Must be unique.

Member Function Documentation

void FinishMeasurement ( )

Stop measuring performance. Call this immediately after the code you want to profile

INT_64 LastPerformanceSample ( )
Returns
Returns the last performance sample, i.e. the amount of time that elapsed between the most recent two calls to StartMeasurement and FinishMeasurement
std::string& Name ( )
inline
Returns
Returns the name of this performance monitor
void StartMeasurement ( )

Start measuring performance. Call this immediately before the code you want to profile

Member Data Documentation

std::string _name
protected

Friendly name for display purposes. Must be unique

INT_64 _sample
protected

The most recent performance sample.

bool _started
protected

True if measurement has been started (i.e. timer is counting

Timer _timer
protected

Timer used to track performance


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