Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / Alt_Mapping / results.h
blobdd2e62756f7c8b3847b0159737b53abfa6ca1e9f
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 (void);
38 /// destructor
39 ~Results (void);
41 /// prints the time stats
42 void print_stats (void);
44 /// print the exception
45 void print_exception (const char *call_name);
47 /// start timing
48 void start_timer (void);
50 /// stop timing
51 void stop_timer (void);
53 /// return call count
54 CORBA::ULong call_count (void);
56 /// set the call count
57 void call_count (CORBA::ULong);
59 /// return the error count
60 CORBA::ULong error_count (void);
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 */