00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef ACE_THROUGHPUT_STATS_H
00015 #define ACE_THROUGHPUT_STATS_H
00016
00017 #include "ace/pre.h"
00018
00019 #include "ace/ACE_export.h"
00020
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif
00024
00025 #include "ace/Basic_Stats.h"
00026
00027 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 class ACE_Export ACE_Throughput_Stats : public ACE_Basic_Stats
00046 {
00047 public:
00048
00049 ACE_Throughput_Stats (void);
00050
00051
00052 void sample (ACE_UINT64 throughput, ACE_UINT64 latency);
00053
00054
00055 void accumulate (const ACE_Throughput_Stats &throughput);
00056
00057
00058 void dump_results (const ACE_TCHAR* msg, ACE_UINT32 scale_factor);
00059
00060
00061 static void dump_throughput (const ACE_TCHAR *msg,
00062 ACE_UINT32 scale_factor,
00063 ACE_UINT64 elapsed_time,
00064 ACE_UINT32 samples_count);
00065 private:
00066
00067 ACE_UINT64 throughput_last_;
00068
00069 #if 0
00070
00071
00072
00073
00074 ACE_UINT64 throughput_sum_x_;
00075 ACE_UINT64 throughput_sum_x2_;
00076 ACE_UINT64 throughput_sum_y_;
00077 ACE_UINT64 throughput_sum_y2_;
00078 ACE_UINT64 throughput_sum_xy_;
00079 #endif
00080 };
00081
00082 ACE_END_VERSIONED_NAMESPACE_DECL
00083
00084 #include "ace/post.h"
00085
00086 #endif