CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Timing.h
Go to the documentation of this file.
1 #ifndef Services_TIMING_h
2 #define Services_TIMING_h
3 // -*- C++ -*-
4 //
5 // Package: Services
6 // Class : Timing
7 //
8 //
9 // Original Author: Jim Kowalkowski
10 //
11 
12 /*
13 
14 Changes Log 1: 2009/01/14 10:29:00, Natalia Garcia Nebot
15  Modified the service to add some new measurements:
16  - Average time per event (cpu and wallclock)
17  - Fastest time per event (cpu and wallclock)
18  - Slowest time per event (cpu and wallclock)
19 */
20 
21 
22 #include "sigc++/signal.h"
23 
26 
27 namespace edm {
28  class ActivityRegistry;
29  class Event;
30  class EventSetup;
31  class ParameterSet;
33 
34  namespace service {
35  class Timing {
36  public:
38  ~Timing();
39 
40  static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);
41 
42  sigc::signal<void, ModuleDescription const&, double> newMeasurementSignal;
43  private:
44  void postBeginJob();
45  void postEndJob();
46 
47  void preEventProcessing(EventID const&, Timestamp const&);
48  void postEventProcessing(Event const&, EventSetup const&);
49 
50  void preModule(ModuleDescription const&);
51  void postModule(ModuleDescription const&);
52 
54  double curr_job_time_; // seconds
55  double curr_job_cpu_; // seconds
56  double curr_event_time_; // seconds
57  double curr_event_cpu_; // seconds
58  double curr_module_time_; // seconds
59  double total_event_cpu_; // seconds
62 
63  //
64  // Min Max and average event times for summary
65  // at end of job
66  double max_event_time_; // seconds
67  double max_event_cpu_; // seconds
68  double min_event_time_; // seconds
69  double min_event_cpu_; // seconds
71  };
72  }
73 }
74 
75 #endif
double curr_job_time_
Definition: Timing.h:54
double max_event_time_
Definition: Timing.h:66
bool report_summary_
Definition: Timing.h:61
double curr_event_cpu_
Definition: Timing.h:57
double curr_job_cpu_
Definition: Timing.h:55
void preModule(ModuleDescription const &)
Definition: Timing.cc:219
EventID curr_event_
Definition: Timing.h:53
double curr_module_time_
Definition: Timing.h:58
Timing(ParameterSet const &, ActivityRegistry &)
Definition: Timing.cc:81
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: Timing.cc:111
void postModule(ModuleDescription const &)
Definition: Timing.cc:223
double max_event_cpu_
Definition: Timing.h:67
sigc::signal< void, ModuleDescription const &, double > newMeasurementSignal
Definition: Timing.h:42
double total_event_cpu_
Definition: Timing.h:59
int total_event_count_
Definition: Timing.h:70
double min_event_cpu_
Definition: Timing.h:69
void preEventProcessing(EventID const &, Timestamp const &)
Definition: Timing.cc:184
void postEventProcessing(Event const &, EventSetup const &)
Definition: Timing.cc:190
double min_event_time_
Definition: Timing.h:68
double curr_event_time_
Definition: Timing.h:56