summaryrefslogtreecommitdiff
path: root/TAO/tests/Portable_Interceptors/Benchmark/marker.h
blob: 4debcac05d01fa62ecec5f78ab970999bf926d60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// $Id$

#include "ace/High_Res_Timer.h"
#include "ace/Sched_Params.h"
#include "ace/Stats.h"
#include "ace/Throughput_Stats.h"

class Marker
{
 public:

  void accumulate_into (ACE_Throughput_Stats &throughput,
                        int which_method) const;
  // Accumulate the throughput statistics into <throughput>

  void dump_stats (const ACE_TCHAR* msg,
                   ACE_UINT32 gsf,
                   int which_method);
  // Print stats

  void sample (ACE_hrtime_t throughput_diff,
               ACE_hrtime_t latency_diff,
               int which_method);
  // get the sample.

 private:
  ACE_Throughput_Stats throughput_method_ready_;
  // Keep throughput statistics on a per-thread basis
  ACE_Throughput_Stats throughput_method_authenticate_;
  // Keep throughput statistics on a per-thread basis
  ACE_Throughput_Stats throughput_method_update_records_;
  // Keep throughput statistics on a per-thread basis
};