ACE 8.0.1
|
Collect basic stats about a series of samples. More...
#include <Basic_Stats.h>
Public Types | |
typedef ACE_UINT64 | scale_factor_type |
Public Member Functions | |
ACE_Basic_Stats () | |
Constructor. | |
ACE_UINT32 | samples_count () const |
The number of samples received so far. | |
void | sample (ACE_UINT64 value) |
Record one sample. | |
void | accumulate (const ACE_Basic_Stats &rhs) |
Update the values to reflect the stats in rhs. | |
void | dump_results (const ACE_TCHAR *msg, scale_factor_type scale_factor) const |
Dump all the samples. | |
Public Attributes | |
ACE_UINT32 | samples_count_ |
The number of samples. | |
ACE_UINT64 | min_ |
The minimum value. | |
ACE_UINT32 | min_at_ |
The number of the sample that had the minimum value. | |
ACE_UINT64 | max_ |
The maximum value. | |
ACE_UINT32 | max_at_ |
The number of the sample that had the maximum value. | |
ACE_UINT64 | sum_ |
The sum of all the values. | |
Collect basic stats about a series of samples.
Compute the average and standard deviation (aka jitter) for an arbitrary number of samples, using constant space. Normally used for latency statistics.
|
inline |
Constructor.
The number of samples is pre-allocated, and cannot changes once the class is initialized.
void ACE_Basic_Stats::accumulate | ( | const ACE_Basic_Stats & | rhs | ) |
Update the values to reflect the stats in rhs.
void ACE_Basic_Stats::dump_results | ( | const ACE_TCHAR * | msg, |
ACE_Basic_Stats::scale_factor_type | sf ) const |
Dump all the samples.
Prints out the results, using msg as a prefix for each message and scaling all the numbers by scale_factor. The latter is useful because high resolution timer samples are acquired in clock ticks, but often presented in microseconds.
|
inline |
Record one sample.
|
inline |
The number of samples received so far.
ACE_UINT64 ACE_Basic_Stats::max_ |
The maximum value.
ACE_UINT32 ACE_Basic_Stats::max_at_ |
The number of the sample that had the maximum value.
ACE_UINT64 ACE_Basic_Stats::min_ |
The minimum value.
ACE_UINT32 ACE_Basic_Stats::min_at_ |
The number of the sample that had the minimum value.
ACE_UINT32 ACE_Basic_Stats::samples_count_ |
The number of samples.
ACE_UINT64 ACE_Basic_Stats::sum_ |
The sum of all the values.