NAME

ACE_Throughput_Stats - A simple class to make throughput and latency analysis.

SYNOPSIS

#include <ace/Stats.h>

class ACE_Throughput_Stats { public: ACE_Throughput_Stats (void); void sample (ACE_UINT64 throughput, ACE_UINT64 latency); void accumulate (const ACE_Throughput_Stats &throughput); void dump_results ( const ASYS_TCHAR* msg, ACE_UINT32 scale_factor ); private: ACE_UINT64 samples_count_; ACE_UINT64 latency_min_; ACE_UINT32 latency_min_at_; ACE_UINT64 latency_max_; ACE_UINT32 latency_max_at_; ACE_UINT64 latency_sum_; ACE_UINT64 latency_sum2_; 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_; };

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 MEMBERS

ACE_Throughput_Stats (void);

void sample (ACE_UINT64 throughput, ACE_UINT64 latency);

void accumulate (const ACE_Throughput_Stats &throughput);

void dump_results (const ASYS_TCHAR* msg, ACE_UINT32 scale_factor);

PRIVATE MEMBERS

ACE_UINT64 samples_count_;

ACE_UINT64 latency_min_;

ACE_UINT32 latency_min_at_;

ACE_UINT64 latency_max_;

ACE_UINT32 latency_max_at_;

ACE_UINT64 latency_sum_;

ACE_UINT64 latency_sum2_;

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_;

AUTHORS

David L. Levine

LIBRARY

ace