diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-21 19:18:22 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-21 19:18:22 +0000 |
commit | a03430f59c8ac2ef22fe595c2edc3b2439e50a7a (patch) | |
tree | 83dbf700e7eb3fbfab3b69b64ed3795452b2ad8b /ace/Stats.h | |
parent | 87e8927c2b70af1827442dc6b96f22618a952441 (diff) | |
download | ATCD-a03430f59c8ac2ef22fe595c2edc3b2439e50a7a.tar.gz |
ChangeLogTag:Mon Jun 21 14:17:22 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'ace/Stats.h')
-rw-r--r-- | ace/Stats.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/ace/Stats.h b/ace/Stats.h index 7a7214f993b..f4ece2f48e5 100644 --- a/ace/Stats.h +++ b/ace/Stats.h @@ -186,6 +186,55 @@ private: // The samples. }; +// **************************************************************** + +class ACE_Export ACE_Throughput_Stats +{ + // = TITLE + // A simple class to make throughput and latency analysis. + // + // = DESCRIPTION + // Keep the relevant information to perform throughput and latency + // analysis, including: + // 1) Minimum, Average and Maximum latency + // 2) Jitter for the latency + // 3) Linear regression for throughput + // 4) Accumulate results from several samples to obtain aggregated + // results, across several threads or experiments. + // +public: + ACE_Throughput_Stats (void); + // Default constructor. + + void sample (ACE_UINT64 throughput, ACE_UINT64 latency); + // Store one sample + + void accumulate (const ACE_Throughput_Stats &throughput); + // Update the values to reflect the stats in <throughput> + + void dump_results (const char* msg, ACE_UINT32 scale_factor); + // Print down the stats + +private: + ACE_UINT64 samples_count_; + // The number of samples + + ACE_UINT64 latency_min_; + ACE_UINT64 latency_max_; + ACE_UINT64 latency_sum_; + ACE_UINT64 latency_sum2_; + // The stadigraphs for latency computation + + ACE_UINT64 throughput_last_; + ACE_UINT64 throughput_sum_x_; + ACE_UINT64 throughput_sum_x2_; + ACE_UINT64 throughput_sum_y_; + ACE_UINT64 throughput_sum_y2_; + ACE_UINT64 throughput_sum_xy_; + // The stadigraphs for throughput computation +}; + + #if defined (__ACE_INLINE__) # include "ace/Stats.i" #endif /* __ACE_INLINE__ */ |