CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FastTimerService.h
Go to the documentation of this file.
1 #ifndef FastTimerService_h
2 #define FastTimerService_h
3 
4 // C++ headers
5 #include <cmath>
6 #include <string>
7 #include <map>
8 #include <unordered_map>
9 #include <chrono>
10 #include <unistd.h>
11 
12 // CMSSW headers
31 
32 
33 /*
34 procesing time is diveded into
35  - source
36  - pre-event processing overhead
37  - event processing
38  - post-event processing overhead
39 
40 until lumi-processing and run-processing are taken into account, they will count as inter-event overhead
41 
42 event processing time is diveded into
43  - trigger processing (from the begin of the first path to the end of the last path)
44  - trigger overhead
45  - endpath processing (from the begin of the first endpath to the end of the last endpath)
46  - endpath overhead
47 */
48 
49 /*
50 Assuming an HLT process with ~2500 modules and ~500 paths, tracking each step (with two calls per step, to start and stop the timer)
51 with std::chrono::high_resolution_clock gives a per-event overhead of 1 ms
52 
53 Detailed informations on different timers can be extracted running $CMSSW_RELEASE_BASE/test/$SCRAM_ARCH/testChrono .
54 
55 
56 Timer per-call overhead on SLC5:
57 
58 Linux 2.6.18-371.1.2.el5 x86_64
59 glibc version: 2.5
60 clock source: unknown
61 For each timer the resolution reported is the MINIMUM (MEDIAN) (MEAN +/- its STDDEV) of the increments measured during the test.
62 
63 Performance of std::chrono::high_resolution_clock
64  Average time per call: 317.0 ns
65  Clock tick period: 1.0 ns
66  Measured resolution: 1000.0 ns (median: 1000.0 ns) (sigma: 199.4 ns) (average: 1007.6 +/- 0.4 ns)
67 
68 
69 Timer per-call overhead on SLC6 (virtualized):
70 
71 Linux 2.6.32-358.23.2.el6.x86_64 x86_64
72 glibc version: 2.12
73 clock source: kvm-clock
74 For each timer the resolution reported is the MINIMUM (MEDIAN) (MEAN +/- its STDDEV) of the increments measured during the test.
75 
76 Performance of std::chrono::high_resolution_clock
77  Average time per call: 351.2 ns
78  Clock tick period: 1.0 ns
79  Measured resolution: 1.0 ns (median: 358.0 ns) (sigma: 30360.8 ns) (average: 685.7 +/- 42.4 ns)
80 */
81 
82 
84 public:
87 
88  // reserve plots for timing vs. luminosity - these should only be called before any begin run (actually, before any preStreamBeginRun)
89  unsigned int reserveLuminosityPlots(std::string const & name, std::string const & title, std::string const & label, double range, double resolution);
90  unsigned int reserveLuminosityPlots(std::string && name, std::string && title, std::string && label, double range, double resolution);
91 
92  // set the event luminosity
93  void setLuminosity(unsigned int stream_id, unsigned int luminosity_id, double value);
94 
95  // query the current module/path/event
96  // Note: these functions incur in a "per-call timer overhead" (see above), currently of the order of 340ns
97  double currentModuleTime(edm::StreamID) const; // return the time spent since the last preModuleEvent() event
98  double currentPathTime(edm::StreamID) const; // return the time spent since the last prePathEvent() event
99  double currentEventTime(edm::StreamID) const; // return the time spent since the last preEvent() event
100 
101  // query the time spent in a module/path (available after it has run)
103  double queryModuleTime(edm::StreamID, unsigned int id) const;
104  double queryModuleTimeByLabel(edm::StreamID, const std::string &) const;
105  double queryModuleTimeByType(edm::StreamID, const std::string &) const;
106  /* FIXME re-implement taking into account subprocesses
107  double queryPathActiveTime(edm::StreamID, const std::string &) const;
108  double queryPathExclusiveTime(edm::StreamID, const std::string &) const;
109  double queryPathTotalTime(edm::StreamID, const std::string &) const;
110  */
111 
112  // query the time spent in the current event's
113  // - source (available during event processing)
114  // - all paths (available during endpaths)
115  // - all endpaths (available after all endpaths have run)
116  // - processing (available after the event has been processed)
117  double querySourceTime(edm::StreamID) const;
118  double queryEventTime(edm::StreamID) const;
119  /* FIXME re-implement taking into account subprocesses
120  double queryPathsTime(edm::StreamID) const;
121  double queryEndPathsTime(edm::StreamID) const;
122  */
123 
124  /* FIXME not yet implemented
125  // try to assess the overhead which may not be included in the source, paths and event timers
126  double queryPreSourceOverhead(edm::StreamID) const; // time spent after the previous event's postEvent and this event's preSource
127  double queryPreEventOverhead(edm::StreamID) const; // time spent after this event's postSource and preEvent
128  double queryPreEndPathsOverhead(edm::StreamID) const; // time spent after the last path's postPathEvent and the first endpath's prePathEvent
129  */
130 
131 private:
133  void postEndJob();
137  void postStreamEndRun(edm::StreamContext const &);
140  void postGlobalEndRun(edm::GlobalContext const &);
144  void preEvent(edm::StreamContext const &);
145  void postEvent(edm::StreamContext const &);
146  void prePathEvent(edm::StreamContext const &, edm::PathContext const &);
152 
153 public:
154  static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);
155 
156 private:
157 
162  double range;
163  double resolution;
164 
165  LuminosityDescription(std::string const & _name, std::string const & _title, std::string const & _label, double _range, double _resolution) :
166  name(_name),
167  title(_title),
168  label(_label),
169  range(_range),
170  resolution(_resolution)
171  { }
172 
173  LuminosityDescription(std::string && _name, std::string && _title, std::string const & _label, double _range, double _resolution) :
174  name(_name),
175  title(_title),
176  label(_label),
177  range(_range),
178  resolution(_resolution)
179  { }
180  };
181 
182 
183  struct PathInfo;
184 
185  struct ModuleInfo {
186  FastTimer timer; // per-event timer
187  double time_active; // time actually spent in this module
189  TH1F * dqm_active;
190  PathInfo * run_in_path; // the path inside which the module was atually active
191  uint32_t counter; // count how many times the module was scheduled to run
192 
193  public:
195  timer(),
196  time_active(0.),
197  summary_active(0.),
200  counter(0)
201  { }
202 
204  reset();
205  }
206 
207  // reset the timers and DQM plots
208  void reset() {
209  timer.reset();
210  time_active = 0.;
211  summary_active = 0.;
212  // the DQM plots are owned by the DQMStore
213  dqm_active = nullptr;
214  run_in_path = nullptr;
215  counter = 0;
216  }
217  };
218 
219  struct PathInfo {
220  std::vector<ModuleInfo *> modules; // list of all modules contributing to the path (duplicate modules stored as null pointers)
221  ModuleInfo * first_module; // first module actually run in this path
222  FastTimer timer; // per-event timer
223  double time_active; // time actually spent in this path
224  double time_exclusive; // time actually spent in this path, in modules that are not run on any other paths
225  double time_premodules; // time spent between "begin path" and the first "begin module"
226  double time_intermodules; // time spent between modules
227  double time_postmodules; // time spent between the last "end module" and "end path"
228  double time_overhead; // sum of time_premodules, time_intermodules, time_postmodules
229  double time_total; // sum of the time spent in all modules which would have run in this path (plus overhead)
236  uint32_t last_run; // index of the last module run in this path, plus one
237  uint32_t index; // index of the Path or EndPath in the "schedule"
238  bool accept; // flag indicating if the path acepted the event
239  TH1F * dqm_active; // see time_active
240  TH1F * dqm_exclusive; // see time_exclusive
241  TH1F * dqm_premodules; // see time_premodules
242  TH1F * dqm_intermodules; // see time_intermodules
243  TH1F * dqm_postmodules; // see time_postmodules
244  TH1F * dqm_overhead; // see time_overhead
245  TH1F * dqm_total; // see time_total
246  TH1F * dqm_module_counter; // for each module in the path, track how many times it ran
247  TH1F * dqm_module_active; // for each module in the path, track the active time spent
248  TH1F * dqm_module_total; // for each module in the path, track the total time spent
249 
250  public:
252  modules(),
254  timer(),
255  time_active(0.),
256  time_exclusive(0.),
257  time_premodules(0.),
258  time_intermodules(0.),
259  time_postmodules(0.),
260  time_overhead(0.),
261  time_total(0.),
262  summary_active(0.),
263  summary_premodules(0.),
266  summary_overhead(0.),
267  summary_total(0.),
268  last_run(0),
269  index(0),
270  accept(false),
281  { }
282 
284  reset();
285  }
286 
287  // reset the timers and DQM plots
288  void reset() {
289  first_module = nullptr;
290  timer.reset();
291  time_active = 0.;
292  time_exclusive = 0.;
293  time_premodules = 0.;
294  time_intermodules = 0.;
295  time_postmodules = 0.;
296  time_overhead = 0.;
297  time_total = 0.;
298  summary_active = 0.;
299  summary_premodules = 0.;
301  summary_postmodules = 0.;
302  summary_overhead = 0.;
303  summary_total = 0.;
304  last_run = 0;
305  index = 0;
306  accept = false;
307 
308  // the DQM plots are owned by the DQMStore
309  dqm_active = nullptr;
310  dqm_premodules = nullptr;
311  dqm_intermodules = nullptr;
312  dqm_postmodules = nullptr;
313  dqm_overhead = nullptr;
314  dqm_total = nullptr;
315  dqm_module_counter = nullptr;
316  dqm_module_active = nullptr;
317  dqm_module_total = nullptr;
318  }
319  };
320 
321  // the vector is indexed by the peudo-process id, the paths by their path name
322  template <typename T>
323  using PathMap = std::vector<std::unordered_map<std::string, T>>;
324 
325  // key on ModuleDescription::id()
326  template <typename T>
327  using ModuleMap = std::vector<T>;
328 
329  // timer configuration
335  const bool m_skip_first_path;
336 
337  // dqm configuration
338  bool m_enable_dqm; // non const because the availability of the DQMStore can only be checked during the begin job
339  const bool m_enable_dqm_bypath_active; // require per-path timers
340  const bool m_enable_dqm_bypath_total; // require per-path and per-module timers
341  const bool m_enable_dqm_bypath_overhead; // require per-path and per-module timers
342  const bool m_enable_dqm_bypath_details; // require per-path and per-module timers
345  const bool m_enable_dqm_bymodule; // require per-module timers
346  const bool m_enable_dqm_bymoduletype; // require per-module timers
348  const bool m_enable_dqm_byls;
350 
351  unsigned int m_concurrent_runs;
352  unsigned int m_concurrent_streams;
353  unsigned int m_concurrent_threads;
354  unsigned int m_module_id; // pseudo module id for the FastTimerService, needed by the thread-safe DQMStore
355 
356  const double m_dqm_eventtime_range;
358  const double m_dqm_pathtime_range;
363 
364  // job configuration and caching
366 
367 
370  std::string first_path; // the framework does not provide a pre/postPaths or pre/postEndPaths signal,
371  std::string last_path; // so we emulate them keeping track of the first and last Path and EndPath
375  };
376 
377 
378  struct Timing {
379  double presource; // time spent between the end of the previous Event, LumiSection or Run, and the beginning of the Source
380  double source; // time spent processing the Source
381  double preevent; // time spent between the end of the Source and the new Event, LumiSection or Run
382  double event; // time spent processing the Event
383  unsigned int count; // number of processed events (used by the per-run and per-job accounting)
384 
385  Timing() :
386  presource (0.),
387  source (0.),
388  preevent (0.),
389  event (0.),
390  count (0)
391  { }
392 
393  void reset() {
394  presource = 0.;
395  source = 0.;
396  preevent = 0.;
397  event = 0.;
398  count = 0;
399  }
400 
401  Timing & operator+=(Timing const & other) {
402  presource += other.presource;
403  source += other.source;
404  preevent += other.preevent;
405  event += other.event;
406  count += other.count;
407 
408  return *this;
409  }
410 
411  Timing operator+(Timing const & other) const {
412  Timing result = *this;
413  result += other;
414  return result;
415  }
416 
417  };
418 
420  double preevent; // time spent between the end of the Source and the new Event, Lumisection or Run
421  double event; // time spent processing the Event
422  double all_paths; // time spent processing all Paths
423  double all_endpaths; // time spent processing all EndPaths
424  double interpaths; // time spent between the Paths (and EndPaths - i.e. the sum of all the entries in the following vector)
425  std::vector<double> paths_interpaths; // time spent between the beginning of the Event and the first Path, between Paths, and between the last (End)Path and the end of the Event
426 
428  preevent (0.),
429  event (0.),
430  all_paths (0.),
431  all_endpaths (0.),
432  interpaths (0.),
434  { }
435 
436  void reset() {
437  preevent = 0.;
438  event = 0.;
439  all_paths = 0.;
440  all_endpaths = 0.;
441  interpaths = 0.;
442  paths_interpaths.assign(paths_interpaths.size(), 0.);
443  }
444 
446  assert( paths_interpaths.size() == other.paths_interpaths.size() );
447 
448  preevent += other.preevent;
449  event += other.event;
450  all_paths += other.all_paths;
451  all_endpaths += other.all_endpaths;
452  interpaths += other.interpaths;
453  for (unsigned int i = 0; i < paths_interpaths.size(); ++i)
455  return *this;
456  }
457 
459  TimingPerProcess result = *this;
460  result += other;
461  return result;
462  }
463 
464  };
465 
466  // set of summary plots, over all subprocesses
467  struct SummaryPlots {
468  TH1F * presource;
469  TH1F * source;
470  TH1F * preevent;
471  TH1F * event;
472 
474  presource (nullptr),
475  source (nullptr),
476  preevent (nullptr),
477  event (nullptr)
478  { }
479 
480  void reset() {
481  // the DQM plots are owned by the DQMStore
482  presource = nullptr;
483  source = nullptr;
484  preevent = nullptr;
485  event = nullptr;
486  }
487 
488  void fill(Timing const & value) {
489  // convert on the fly from seconds to ms
490  presource ->Fill( 1000. * value.presource );
491  source ->Fill( 1000. * value.source );
492  preevent ->Fill( 1000. * value.preevent );
493  event ->Fill( 1000. * value.event );
494  }
495 
496  };
497 
498  // set of summary plots, per subprocess
500  TH1F * preevent;
501  TH1F * event;
502  TH1F * all_paths;
503  TH1F * all_endpaths;
504  TH1F * interpaths;
505 
507  preevent (nullptr),
508  event (nullptr),
509  all_paths (nullptr),
512  { }
513 
514  void reset() {
515  // the DQM plots are owned by the DQMStore
516  preevent = nullptr;
517  event = nullptr;
518  all_paths = nullptr;
519  all_endpaths = nullptr;
520  interpaths = nullptr;
521  }
522 
523  void fill(TimingPerProcess const & value) {
524  // convert on the fly from seconds to ms
525  preevent ->Fill( 1000. * value.preevent );
526  event ->Fill( 1000. * value.event );
527  all_paths ->Fill( 1000. * value.all_paths );
528  all_endpaths ->Fill( 1000. * value.all_endpaths );
529  interpaths ->Fill( 1000. * value.interpaths );
530  }
531 
532  };
533 
534  // set of summary profiles vs. luminosity, over all subprocesses
536  TProfile * presource;
537  TProfile * source;
538  TProfile * preevent;
539  TProfile * event;
540 
542  presource (nullptr),
543  source (nullptr),
544  preevent (nullptr),
545  event (nullptr)
546  { }
547 
548  void reset() {
549  // the DQM plots are owned by the DQMStore
550  presource = nullptr;
551  source = nullptr;
552  preevent = nullptr;
553  event = nullptr;
554  }
555 
556  void fill(double x, Timing const & value) {
557  presource ->Fill( x, 1000. * value.presource );
558  source ->Fill( x, 1000. * value.source );
559  preevent ->Fill( x, 1000. * value.preevent );
560  event ->Fill( x, 1000. * value.event );
561  }
562 
563  };
564 
565  // set of summary profiles vs. luminosity, per subprocess
567  TProfile * preevent;
568  TProfile * event;
569  TProfile * all_paths;
570  TProfile * all_endpaths;
571  TProfile * interpaths;
572 
574  preevent (nullptr),
575  event (nullptr),
576  all_paths (nullptr),
579  { }
580 
582  reset();
583  }
584 
585  void reset() {
586  // the DQM plots are owned by the DQMStore
587  preevent = nullptr;
588  event = nullptr;
589  all_paths = nullptr;
590  all_endpaths = nullptr;
591  interpaths = nullptr;
592  }
593 
594  void fill(double x, TimingPerProcess const & value) {
595  preevent ->Fill( x, 1000. * value.preevent );
596  event ->Fill( x, 1000. * value.event );
597  all_paths ->Fill( x, 1000. * value.all_paths );
598  all_endpaths ->Fill( x, 1000. * value.all_endpaths );
599  interpaths ->Fill( x, 1000. * value.interpaths );
600  }
601 
602  };
603 
604  // set of profile plots by path, per subprocess
606  TProfile * active_time;
607  TProfile * total_time;
608  TProfile * exclusive_time;
609  TProfile * interpaths;
610 
616  {}
617 
619  reset();
620  }
621 
622  void reset() {
623  // the DQM plots are owned by the DQMStore
624  active_time = nullptr;
625  total_time = nullptr;
626  exclusive_time = nullptr;
627  interpaths = nullptr;
628  }
629 
630  };
631 
632  struct StreamData {
633  // timers
634  FastTimer timer_event; // track time spent in each event
635  FastTimer timer_source; // track time spent in the source
636  FastTimer timer_paths; // track time spent in all paths
637  FastTimer timer_endpaths; // track time spent in all endpaths
638  FastTimer timer_path; // track time spent in each path
639  FastTimer::Clock::time_point timer_last_path; // record the stop of the last path run
640  FastTimer::Clock::time_point timer_last_transition; // record the last transition (end source, end event, end lumi, end run)
641 
642  // time accounting per-event
644  std::vector<TimingPerProcess> timing_perprocess;
645 
646  // luminosity per event
647  std::vector<double> luminosity;
648 
649  // overall plots
650  SummaryPlots dqm; // whole event summary plots
651  std::vector<SummaryProfiles> dqm_byluminosity; // whole event plots vs. "luminosity"
652  std::vector<SummaryPlotsPerProcess> dqm_perprocess; // per-process event summary plots
653  std::vector<std::vector<SummaryProfilesPerProcess>> dqm_perprocess_byluminosity; // per-process plots vs. "luminosity"
654 
655  // plots by path
656  std::vector<PathProfilesPerProcess> dqm_paths;
657 
658  // per-path, per-module and per-module-type accounting
662  std::unordered_map<std::string, ModuleInfo> modules;
663  std::unordered_map<std::string, ModuleInfo> moduletypes;
664  ModuleMap<ModuleInfo *> fast_modules; // these assume that module ids are constant throughout the whole job,
666 
668  // timers
669  timer_event(),
670  timer_source(),
671  timer_paths(),
672  timer_endpaths(),
673  timer_path(),
674  timer_last_path(),
676  // time accounting per-event
677  timing(),
679  // luminosity per event
680  luminosity(),
681  // overall plots
682  dqm(),
684  dqm_perprocess(),
686  // plots by path
687  dqm_paths(),
688  // per-path, per-module and per-module-type accounting
691  paths(),
692  modules(),
693  moduletypes(),
694  fast_modules(),
696  { }
697 
698  // called in FastTimerService::postStreamEndRun()
699  void reset() {
700  // timers
701  timer_event.reset();
703  timer_paths.reset();
705  timer_path.reset();
706  timer_last_path = FastTimer::Clock::time_point();
707  timer_last_transition = FastTimer::Clock::time_point();
708  // time accounting per-event
709  timing.reset();
710  for (auto & timing: timing_perprocess)
711  timing.reset();
712  // luminosity per event
713  for (auto & lumi: luminosity)
714  lumi = 0;
715  // overall plots
716  dqm.reset();
717  for (auto & plots: dqm_byluminosity)
718  plots.reset();
719  for (auto & perprocess_plots: dqm_perprocess)
720  perprocess_plots.reset();
721  for (auto & process_plots: dqm_perprocess_byluminosity)
722  for (auto & plots: process_plots)
723  plots.reset();
724  // plots by path
725  for (auto & plots: dqm_paths)
726  plots.reset();
727  // per-path, per-module and per-module-type accounting
728  current_path = nullptr;
729  current_module = nullptr;
730  for (auto & map: paths)
731  for (auto & keyval: map)
732  keyval.second.reset();
733  for (auto & keyval: modules)
734  keyval.second.reset();
735  for (auto & keyval: moduletypes)
736  keyval.second.reset();
737  }
738 
739  };
740 
741  // process descriptions
742  std::vector<ProcessDescription> m_process;
743 
744  // description of the luminosity axes
745  std::vector<LuminosityDescription> m_dqm_luminosity;
746 
747  // stream data
748  std::vector<StreamData> m_stream;
749 
750  // summary data
751  std::vector<Timing> m_run_summary; // whole event time accounting per-run
752  Timing m_job_summary; // whole event time accounting per-run
753  std::vector<std::vector<TimingPerProcess>> m_run_summary_perprocess; // per-process time accounting per-job
754  std::vector<TimingPerProcess> m_job_summary_perprocess; // per-process time accounting per-job
755 
756  static
757  double delta(FastTimer::Clock::time_point const & first, FastTimer::Clock::time_point const & second)
758  {
759  return std::chrono::duration_cast<std::chrono::duration<double>>(second - first).count();
760  }
761 
762  // associate to a path all the modules it contains
763  void fillPathMap(unsigned int pid, std::string const & name, std::vector<std::string> const & modules);
764 
765  // print a timing summary for the run or job
766  void printSummary(Timing const & summary, std::string const & label) const;
767  void printProcessSummary(Timing const & total, TimingPerProcess const & summary, std::string const & label, std::string const & process) const;
768 
769  // assign a "process id" to a process, given its ProcessContext
770  static
771  unsigned int processID(edm::ProcessContext const *);
772 
773 };
774 
775 #endif // ! FastTimerService_h
void preGlobalBeginRun(edm::GlobalContext const &)
void preModuleEventDelayedGet(edm::StreamContext const &, edm::ModuleCallingContext const &)
FastTimer::Clock::time_point timer_last_path
void postStreamBeginRun(edm::StreamContext const &)
double queryEventTime(edm::StreamID) const
int i
Definition: DBlmapReader.cc:9
const double m_dqm_eventtime_resolution
std::vector< std::unordered_map< std::string, T >> PathMap
void postStreamEndLumi(edm::StreamContext const &)
LuminosityDescription(std::string &&_name, std::string &&_title, std::string const &_label, double _range, double _resolution)
static double delta(FastTimer::Clock::time_point const &first, FastTimer::Clock::time_point const &second)
unsigned int m_concurrent_streams
void postModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
std::vector< TimingPerProcess > timing_perprocess
LuminosityDescription(std::string const &_name, std::string const &_title, std::string const &_label, double _range, double _resolution)
FastTimer::Clock::time_point timer_last_transition
tuple lumi
Definition: fjr2json.py:35
const bool m_enable_dqm_bypath_counters
const bool m_skip_first_path
const bool m_enable_dqm_bypath_exclusive
#define nullptr
void printSummary(Timing const &summary, std::string const &label) const
ModuleMap< ModuleInfo * > fast_moduletypes
std::vector< ProcessDescription > m_process
void fill(double x, TimingPerProcess const &value)
const double m_dqm_pathtime_range
double currentPathTime(edm::StreamID) const
std::vector< SummaryProfiles > dqm_byluminosity
std::vector< TimingPerProcess > m_job_summary_perprocess
void postPathEvent(edm::StreamContext const &, edm::PathContext const &, edm::HLTPathStatus const &)
unsigned int m_concurrent_threads
std::string m_dqm_path
unsigned int m_concurrent_runs
void postStreamBeginLumi(edm::StreamContext const &)
U second(std::pair< T, U > const &p)
void preModuleBeginJob(edm::ModuleDescription const &)
std::vector< T > ModuleMap
const bool m_enable_dqm_bynproc
Timing & operator+=(Timing const &other)
std::vector< LuminosityDescription > m_dqm_luminosity
unsigned int m_module_id
void prePathEvent(edm::StreamContext const &, edm::PathContext const &)
const bool m_enable_dqm_byls
const double m_dqm_moduletime_resolution
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
FastTimerService(const edm::ParameterSet &, edm::ActivityRegistry &)
double queryModuleTimeByLabel(edm::StreamID, const std::string &) const
tuple result
Definition: query.py:137
double currentEventTime(edm::StreamID) const
std::unordered_map< std::string, ModuleInfo > modules
void postEvent(edm::StreamContext const &)
void postGlobalEndRun(edm::GlobalContext const &)
void setLuminosity(unsigned int stream_id, unsigned int luminosity_id, double value)
std::vector< std::vector< TimingPerProcess > > m_run_summary_perprocess
void postStreamEndRun(edm::StreamContext const &)
void preModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
const bool m_enable_dqm_bypath_details
std::unordered_map< std::string, ModuleInfo > moduletypes
std::vector< double > luminosity
std::vector< Timing > m_run_summary
void fillPathMap(unsigned int pid, std::string const &name, std::vector< std::string > const &modules)
const bool m_enable_dqm_bypath_overhead
std::vector< SummaryPlotsPerProcess > dqm_perprocess
bool first
Definition: L1TdeRCT.cc:79
TimingPerProcess & operator+=(TimingPerProcess const &other)
ModuleMap< ModuleInfo * > fast_modules
const bool m_enable_dqm_bymodule
void postModuleEventDelayedGet(edm::StreamContext const &, edm::ModuleCallingContext const &)
const double m_dqm_moduletime_range
std::vector< std::vector< SummaryProfilesPerProcess > > dqm_perprocess_byluminosity
double querySourceTime(edm::StreamID) const
Timing operator+(Timing const &other) const
tuple pid
Definition: sysUtil.py:22
void preSourceEvent(edm::StreamID)
void preEvent(edm::StreamContext const &)
const bool m_enable_timing_summary
void postSourceEvent(edm::StreamID)
const bool m_enable_dqm_bymoduletype
const bool m_enable_dqm_summary
double queryModuleTimeByType(edm::StreamID, const std::string &) const
const bool m_enable_dqm_bypath_total
void reset()
Definition: FastTimer.cc:62
double queryModuleTime(edm::StreamID, const edm::ModuleDescription &) const
const bool m_enable_dqm_bypath_active
void fill(Timing const &value)
std::vector< ModuleInfo * > modules
volatile std::atomic< bool > shutdown_flag false
Definition: DDAxes.h:10
std::vector< PathProfilesPerProcess > dqm_paths
tuple process
Definition: LaserDQM_cfg.py:3
static unsigned int processID(edm::ProcessContext const *)
double currentModuleTime(edm::StreamID) const
void fill(TimingPerProcess const &value)
void preStreamBeginRun(edm::StreamContext const &)
std::vector< StreamData > m_stream
std::vector< double > paths_interpaths
unsigned int reserveLuminosityPlots(std::string const &name, std::string const &title, std::string const &label, double range, double resolution)
void printProcessSummary(Timing const &total, TimingPerProcess const &summary, std::string const &label, std::string const &process) const
void fill(double x, Timing const &value)
void preallocate(edm::service::SystemBounds const &)
const double m_dqm_eventtime_range
TimingPerProcess operator+(TimingPerProcess const &other) const
const double m_dqm_pathtime_resolution