*Backed out changeset 3be01fb200a5

--HG--
branch : trunk
This commit is contained in:
maximius committed 2009-10-17 15:51:44 -07:00
1 parent 26b5e033ff
commit e585187b24
2257 files changed
+103863 -761

No files matched your search

+18
View File
@@ -9,15 +9,20 @@
*/
//=============================================================================
#ifndef ACE_BASIC_STATS_H
#define ACE_BASIC_STATS_H
#include /**/ "ace/pre.h"
#include /**/ "ace/config-all.h"
#include "ace/Basic_Types.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
/// Collect basic stats about a series of samples
/**
* Compute the average and standard deviation (aka jitter) for an
@@ -33,12 +38,16 @@ public:
* the class is initialized.
*/
ACE_Basic_Stats (void);
/// The number of samples received so far
ACE_UINT32 samples_count (void) const;
/// Record one sample.
void sample (ACE_UINT64 value);
/// Update the values to reflect the stats in @a rhs.
void accumulate (const ACE_Basic_Stats &rhs);
/// Dump all the samples
/**
* Prints out the results, using @a msg as a prefix for each message and
@@ -48,23 +57,32 @@ public:
*/
void dump_results (const ACE_TCHAR *msg,
ACE_UINT32 scale_factor) const;
/// The number of samples
ACE_UINT32 samples_count_;
/// The minimum value
ACE_UINT64 min_;
/// The number of the sample that had the minimum value
ACE_UINT32 min_at_;
/// The maximum value
ACE_UINT64 max_;
/// The number of the sample that had the maximum value
ACE_UINT32 max_at_;
/// The sum of all the values
ACE_UINT64 sum_;
};
ACE_END_VERSIONED_NAMESPACE_DECL
#if defined (__ACE_INLINE__)
#include "ace/Basic_Stats.inl"
#endif /* __ACE_INLINE__ */
#include /**/ "ace/post.h"
#endif /* ACE_BASIC_STATS_H */