summaryrefslogtreecommitdiff
path: root/TAO/tests/Portable_Interceptors/Benchmark/marker.h
blob: 8afb698337eda40cdc1664d3463f77d020ea8b10 (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
// $Id$

#include "ace/High_Res_Timer.h"
#include "ace/Sched_Params.h"
#include "ace/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 char* 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
};