summaryrefslogtreecommitdiff
path: root/TAO/tests/Param_Test/results.h
blob: 5f8139f655b2662b3130eea4586b13edd7c2d9c7 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// $Id$

// ============================================================================
//
// = LIBRARY
//    TAO/tests/Param_Test
//
// = FILENAME
//    results.h
//
// = DESCRIPTION
//    Printing the results
//
// = AUTHORS
//    Aniruddha Gokhale
//
// ============================================================================

#ifndef RESULTS_H
#define RESULTS_H

#include "tao/corba.h"
#include "ace/Profile_Timer.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

class Results
{
public:
  Results (void);
  // ctor

  ~Results (void);
  // destructor

  void print_stats (void);
  // prints the time stats

  void print_exception (const char *call_name,
                        CORBA::Environment &);
  // print the exception

  void start_timer (void);
  // start timing

  void stop_timer (void);
  // stop timing

  CORBA::ULong call_count (void);
  // return call count

  void call_count (CORBA::ULong);
  // set the call count

  CORBA::ULong error_count (void);
  // return the error count

  void error_count (CORBA::ULong);
  // set error count

  void iterations (CORBA::ULong iters);
  // set the number of times the test will be run

private:
  CORBA::ULong call_count_;
  // # of calls made to functions

  CORBA::ULong error_count_;
  // # of errors incurred in the lifetime of the application.

  ACE_Profile_Timer timer_;
  // for timing the test

  ACE_Profile_Timer::ACE_Elapsed_Time *elapsed_time_;
  // holds the elapsed time for each iteration
};

#endif /* RESULTS_H */