Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# ACE_Sample_History Class Reference

Save multiple samples in an array. More...

`#include <Sample_History.h>`

List of all members.

## Public Methods
| ACE_Sample_History (size_t max_samples)
| Constructor. More...
| ~ACE_Sample_History (void)
| Destructor. More...
int | sample (ACE_UINT64 value)
| Record one sample. More...
size_t | max_samples (void) const
| Returns the maximum number of samples. More...
size_t | sample_count (void) const
| Returns the current number of samples. More...
void | dump_samples (const ACE_TCHAR *msg, ACE_UINT32 scale_factor) const
| Dump all the samples. More...
void | collect_basic_stats (ACE_Basic_Stats &) const
| Collect the summary for all the samples. More...
ACE_UINT64 | get_sample (size_t i) const
| Get a sample. More...
## Private Attributes
size_t | max_samples_
| The maximum number of samples. More...
size_t | sample_count_
| The current number of samples. More...
ACE_UINT64 * | samples_
| The samples. More...

## Detailed Description

Save multiple samples in an array.

Save multiple samples (usually latency numbers), into an array, and later print them in several formats.

## Constructor & Destructor Documentation

ACE_Sample_History::ACE_Sample_History | ( | size_t | max_samples | ) |

| Constructor. The number of samples is pre-allocated, and cannot changes once the class is initialized.

ACE_Sample_History::~ACE_Sample_History | ( | void |  | ) |

| Destructor.

## Member Function Documentation

void ACE_Sample_History::collect_basic_stats | ( | ACE_Basic_Stats & | stats | ) | const

| Collect the summary for all the samples.

void ACE_Sample_History::dump_samples | ( | const ACE_TCHAR * | msg,
|  | ACE_UINT32 | scale_factor
| ) | const

| Dump all the samples. Prints out all the samples, using msg as a prefix for each message.

ACE_INLINE ACE_UINT64 ACE_Sample_History::get_sample | ( | size_t | i | ) | const

| Get a sample.

size_t ACE_Sample_History::max_samples | ( | void |  | ) | const

| Returns the maximum number of samples.

ACE_INLINE int ACE_Sample_History::sample | ( | ACE_UINT64 | value | ) |

| Record one sample. Return 0 on success, -1 if the sample could not be stored

size_t ACE_Sample_History::sample_count | ( | void |  | ) | const

| Returns the current number of samples.

## Member Data Documentation

size_t ACE_Sample_History::max_samples_`[private]`

| The maximum number of samples.

size_t ACE_Sample_History::sample_count_`[private]`

| The current number of samples.

ACE_UINT64* ACE_Sample_History::samples_`[private]`

| The samples.

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

- Sample_History.h
- Sample_History.cpp
- Sample_History.inl