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