A stats reporter class is responsible for managing a collection of time stats.
More...
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.
|
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 |
( |
| ) |
|
Get a stat for a enum value, if the stat does not exist a new stat will be created.
- Parameters
-
| Input | |
| statEnumIndex,the | enumerated 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 |
| const TimeStats& DtPerformanceStats::stats |
( |
| ) |
const |
Member Data Documentation
The documentation for this class was generated from the following file: