Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / tests / Alt_Mapping / results.h
blob0607cc430e9d7dd3a93f6bddf0cc5b3773f9efc5
2 //=============================================================================
3 /**
4 * @file results.h
6 * Printing the results
8 * @author Aniruddha Gokhale
9 */
10 //=============================================================================
13 #ifndef RESULTS_H
14 #define RESULTS_H
16 #include "tao/Basic_Types.h"
18 #include "ace/Profile_Timer.h"
19 #include "ace/CORBA_macros.h"
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 # pragma once
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
25 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
26 namespace CORBA
28 class Environment;
30 TAO_END_VERSIONED_NAMESPACE_DECL
32 class Results
34 public:
35 /// ctor
36 Results ();
38 /// destructor
39 ~Results ();
41 /// prints the time stats
42 void print_stats ();
44 /// print the exception
45 void print_exception (const char *call_name);
47 /// start timing
48 void start_timer ();
50 /// stop timing
51 void stop_timer ();
53 /// return call count
54 CORBA::ULong call_count ();
56 /// set the call count
57 void call_count (CORBA::ULong);
59 /// return the error count
60 CORBA::ULong error_count ();
62 /// set error count
63 void error_count (CORBA::ULong);
65 /// set the number of times the test will be run
66 void iterations (CORBA::ULong iters);
68 private:
69 /// # of calls made to functions
70 CORBA::ULong call_count_;
72 /// # of errors incurred in the lifetime of the application.
73 CORBA::ULong error_count_;
75 /// for timing the test
76 ACE_Profile_Timer timer_;
78 /// holds the elapsed time for each iteration
79 ACE_Profile_Timer::ACE_Elapsed_Time *elapsed_time_;
82 #endif /* RESULTS_H */