VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Attributes
DtPerformanceStats Class Reference

A stats reporter class is responsible for managing a collection of time stats. More...

+ Collaboration diagram for DtPerformanceStats:

Public Types

typedef std::vector
< DtTimeStatistic
TimeStats

Public Member Functions

 DtPerformanceStats ()
 ~DtPerformanceStats ()
void resetAllStats ()
 Reset all of the stats.
void addTime (unsigned int id, double time)
 Add a new time sample for a particular stat.
double last (unsigned int id) const
 Get the last added time sample for a particular stat.
double minimum (unsigned int id) const
 Get the minimum time sample for a particular stat.
double avg (unsigned int id) const
 Get the average time sample for a particular stat.
double maximum (unsigned int id) const
 Get the maximum time sample.
DtTimeStatisticstat (unsigned int statEnumIndex)
 Get a stat for a enum value, if the stat does not exist a new stat will be created.
const DtTimeStatisticstat (unsigned int statEnumIndex) const
TimeStatsstats ()
 Get all of the stats.
const TimeStatsstats () const
 Get all of the stats.

Protected Attributes

TimeStats myStats

Detailed Description

A stats reporter class is responsible for managing a collection of time stats.

Typically it is only necessary to create a single reporter for your application, and create DtTimeStatistic objects automatically via it's stat function. .

Examples

Member Typedef Documentation

Constructor & Destructor Documentation

DtPerformanceStats::DtPerformanceStats ( )
DtPerformanceStats::~DtPerformanceStats ( )

Member Function Documentation

void DtPerformanceStats::addTime ( unsigned int  id,
double  time 
)
inline

Add a new time sample for a particular stat.

double DtPerformanceStats::avg ( unsigned int  id) const
inline

Get the average time sample for a particular stat.

double DtPerformanceStats::last ( unsigned int  id) const
inline

Get the last added time sample for a particular stat.

double DtPerformanceStats::maximum ( unsigned int  id) const
inline

Get the maximum time sample.

double DtPerformanceStats::minimum ( unsigned int  id) const
inline

Get the minimum time sample for a particular stat.

void DtPerformanceStats::resetAllStats ( )

Reset all of the stats.

DtTimeStatistic& DtPerformanceStats::stat ( unsigned int  statEnumIndex)

Get a stat for a enum value, if the stat does not exist a new stat will be created.

Parameters
Input
statEnumIndex,theenumerated index of the stat you are interested in.
Warning
Do not use large enum values as the enum index refers to the actual index in a vector. Thus if you create a value of 100, it will automatically create 99 extra stats.
const DtTimeStatistic& DtPerformanceStats::stat ( unsigned int  statEnumIndex) const
TimeStats& DtPerformanceStats::stats ( )

Get all of the stats.

const TimeStats& DtPerformanceStats::stats ( ) const

Get all of the stats.

Member Data Documentation

TimeStats DtPerformanceStats::myStats
protected

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

Document ID: Generated on Fri Dec 2 02:42:08 EST 2016 from SVN revision 171416
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)