Merge pull request #2222 from jwillemsen/jwi-dllexportwarning
[ACE_TAO.git] / TAO / tests / Portable_Interceptors / Benchmark / marker.cpp
blobbb1ca298186df74ad1c2c2966504cd3a86c4e663
1 #include "marker.h"
3 void
4 Marker::accumulate_into (ACE_Throughput_Stats &throughput,
5 int which_method) const
7 switch (which_method)
9 case 1: // method ready
10 throughput.accumulate (this->throughput_method_ready_);
11 break;
12 case 2: // method authenticate
13 throughput.accumulate (this->throughput_method_authenticate_);
14 break;
15 case 3: // method update_records
16 throughput.accumulate (this->throughput_method_update_records_);
17 break;
18 default:
19 break;
24 void
25 Marker::dump_stats (const ACE_TCHAR* msg,
26 ACE_High_Res_Timer::global_scale_factor_type gsf,
27 int which_method)
29 switch (which_method)
31 case 1: // method ready
32 this->throughput_method_ready_.dump_results (msg, gsf);
33 break;
34 case 2: // method authentciate
35 this->throughput_method_authenticate_.dump_results (msg, gsf);
36 break;
37 case 3: // method update_records
38 this->throughput_method_update_records_.dump_results (msg, gsf);
39 break;
40 default:
41 break;
45 void
46 Marker::sample (ACE_hrtime_t throughput_diff,
47 ACE_hrtime_t latency_diff,
48 int which_method)
50 switch (which_method)
52 case 1: // method ready
53 this->throughput_method_ready_.sample (throughput_diff,
54 latency_diff);
55 break;
56 case 2: // method authentciate
57 this->throughput_method_authenticate_.sample (throughput_diff,
58 latency_diff);
59 break;
60 case 3: // method update_records
61 this->throughput_method_update_records_.sample (throughput_diff,
62 latency_diff);
63 break;
64 default:
65 break;