VR-Link API Documentation for DIS
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:

List of all members.

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.
DtTimeStatistic & stat (unsigned int statEnumIndex)
 Get a stat for a enum value, if the stat does not exist a new stat will be created.
const DtTimeStatistic & stat (unsigned int statEnumIndex) const
TimeStats & stats ()
 Get all of the stats.
const TimeStats & stats () 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


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.

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

Get all of the stats.

Get all of the stats.


Member Data Documentation


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

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)