CMS 3D CMS Logo

FastTimerService.cc
Go to the documentation of this file.
1 // C++ headers
2 #include <cmath>
3 #include <fstream>
4 #include <iomanip>
5 #include <iostream>
6 #include <limits>
7 #include <mutex>
8 #include <sstream>
9 #include <string>
10 #include <unordered_map>
11 #include <unordered_set>
12 
13 // boost headers
14 #include <boost/format.hpp>
15 #include <boost/range/irange.hpp>
16 
17 // JSON headers
18 #include <nlohmann/json.hpp>
20 
21 // CMSSW headers
38 #include "FastTimerService.h"
39 
40 using namespace std::literals;
41 
43 
44 namespace {
45 
46  // convert any std::chrono::duration to milliseconds
47  template <class Rep, class Period>
48  double ms(std::chrono::duration<Rep, Period> duration) {
49  return std::chrono::duration_cast<std::chrono::duration<double, std::milli>>(duration).count();
50  }
51 
52  // convert any boost::chrono::duration to milliseconds
53  template <class Rep, class Period>
54  double ms(boost::chrono::duration<Rep, Period> duration) {
55  return boost::chrono::duration_cast<boost::chrono::duration<double, boost::milli>>(duration).count();
56  }
57 
58  // convert a std::atomic<boost::chrono::nanoseconds::rep> to milliseconds
59  double ms(std::atomic<boost::chrono::nanoseconds::rep> const& duration) {
60  return boost::chrono::duration_cast<boost::chrono::duration<double, boost::milli>>(
61  boost::chrono::nanoseconds(duration.load()))
62  .count();
63  }
64 
65  // convert from bytes to kilobytes, rounding down
66  uint64_t kB(uint64_t bytes) { return bytes / 1024; }
67 
68  // convert from bytes to kilobytes, rounding down
69  uint64_t kB(std::atomic<uint64_t> const& bytes) { return bytes.load() / 1024; }
70 
71 } // namespace
72 
74 
75 // resources being monitored by the service
76 
77 // Resources
78 
80  : time_thread(boost::chrono::nanoseconds::zero()),
81  time_real(boost::chrono::nanoseconds::zero()),
82  allocated(0ul),
83  deallocated(0ul) {}
84 
86  time_thread = boost::chrono::nanoseconds::zero();
87  time_real = boost::chrono::nanoseconds::zero();
88  allocated = 0ul;
89  deallocated = 0ul;
90 }
91 
93  time_thread += other.time_thread;
94  time_real += other.time_real;
95  allocated += other.allocated;
96  deallocated += other.deallocated;
97  return *this;
98 }
99 
101  time_thread += boost::chrono::nanoseconds(other.time_thread.load());
102  time_real += boost::chrono::nanoseconds(other.time_real.load());
103  allocated += other.allocated.load();
104  deallocated += other.deallocated.load();
105  return *this;
106 }
107 
109  Resources result(*this);
110  result += other;
111  return result;
112 }
113 
115  Resources result(*this);
116  result += other;
117  return result;
118 }
119 
120 // AtomicResources
121 // operation on the whole object are not atomic, as the operations
122 // on the individual fields could be interleaved; however, accumulation
123 // of results should yield the correct result.
124 
126  : time_thread(0ul), time_real(0ul), allocated(0ul), deallocated(0ul) {}
127 
129  : time_thread(other.time_thread.load()),
130  time_real(other.time_real.load()),
131  allocated(other.allocated.load()),
132  deallocated(other.deallocated.load()) {}
133 
135  time_thread = 0ul;
136  time_real = 0ul;
137  allocated = 0ul;
138  deallocated = 0ul;
139 }
140 
142  time_thread = other.time_thread.load();
143  time_real = other.time_real.load();
144  allocated = other.allocated.load();
145  deallocated = other.deallocated.load();
146  return *this;
147 }
148 
150  time_thread += other.time_thread.load();
151  time_real += other.time_real.load();
152  allocated += other.allocated.load();
153  deallocated += other.deallocated.load();
154  return *this;
155 }
156 
158  time_thread += other.time_thread.count();
159  time_real += other.time_real.count();
160  allocated += other.allocated;
161  deallocated += other.deallocated;
162  return *this;
163 }
164 
166  AtomicResources result(*this);
167  result += other;
168  return result;
169 }
170 
172  return other + *this;
173 }
174 
175 // ResourcesPerModule
176 
178 
180  total.reset();
181  events = 0;
182  has_acquire = false;
183 }
184 
186  total += other.total;
187  events += other.events;
188  has_acquire = has_acquire or other.has_acquire;
189  return *this;
190 }
191 
193  ResourcesPerModule const& other) const {
194  ResourcesPerModule result(*this);
195  result += other;
196  return result;
197 }
198 
199 // ResourcesPerPath
200 
202  active.reset();
203  total.reset();
204  last = 0;
205  status = false;
206 }
207 
209  active += other.active;
210  total += other.total;
211  last = 0; // summing these makes no sense, reset them instead
212  status = false;
213  return *this;
214 }
215 
217  ResourcesPerPath result(*this);
218  result += other;
219  return result;
220 }
221 
222 // ResourcesPerProcess
223 
225  : total(), paths(process.paths_.size()), endpaths(process.endPaths_.size()) {}
226 
228  total.reset();
229  for (auto& path : paths)
230  path.reset();
231  for (auto& path : endpaths)
232  path.reset();
233 }
234 
236  ResourcesPerProcess const& other) {
237  total += other.total;
238  assert(paths.size() == other.paths.size());
239  for (unsigned int i : boost::irange(0ul, paths.size()))
240  paths[i] += other.paths[i];
241  assert(endpaths.size() == other.endpaths.size());
242  for (unsigned int i : boost::irange(0ul, endpaths.size()))
243  endpaths[i] += other.endpaths[i];
244  return *this;
245 }
246 
248  ResourcesPerProcess const& other) const {
250  result += other;
251  return result;
252 }
253 
254 // ResourcesPerJob
255 
257  std::vector<GroupOfModules> const& groups)
258  : total(), overhead(), event(), highlight(groups.size()), modules(job.size()), processes(), events(0) {
259  processes.reserve(job.processes().size());
260  for (auto const& process : job.processes())
261  processes.emplace_back(process);
262 }
263 
265  total.reset();
266  overhead.reset();
267  event.reset();
268  for (auto& module : highlight)
269  module.reset();
270  for (auto& module : modules)
271  module.reset();
272  for (auto& process : processes)
273  process.reset();
274  events = 0;
275 }
276 
278  total += other.total;
279  overhead += other.overhead;
280  event += other.event;
281  assert(highlight.size() == other.highlight.size());
282  for (unsigned int i : boost::irange(0ul, highlight.size()))
283  highlight[i] += other.highlight[i];
284  assert(modules.size() == other.modules.size());
285  for (unsigned int i : boost::irange(0ul, modules.size()))
286  modules[i] += other.modules[i];
287  assert(processes.size() == other.processes.size());
288  for (unsigned int i : boost::irange(0ul, processes.size()))
289  processes[i] += other.processes[i];
290  events += other.events;
291  return *this;
292 }
293 
295  ResourcesPerJob result(*this);
296  result += other;
297  return result;
298 }
299 
300 // per-thread measurements
301 
302 // Measurement
303 
305 
307 #ifdef DEBUG_THREAD_CONCURRENCY
308  id = std::this_thread::get_id();
309 #endif // DEBUG_THREAD_CONCURRENCY
310  time_thread = boost::chrono::thread_clock::now();
312  allocated = memory_usage::allocated();
313  deallocated = memory_usage::deallocated();
314 }
315 
317 #ifdef DEBUG_THREAD_CONCURRENCY
318  assert(std::this_thread::get_id() == id);
319 #endif // DEBUG_THREAD_CONCURRENCY
320  auto new_time_thread = boost::chrono::thread_clock::now();
321  auto new_time_real = boost::chrono::high_resolution_clock::now();
322  auto new_allocated = memory_usage::allocated();
323  auto new_deallocated = memory_usage::deallocated();
324  store.time_thread = new_time_thread - time_thread;
325  store.time_real = new_time_real - time_real;
326  store.allocated = new_allocated - allocated;
327  store.deallocated = new_deallocated - deallocated;
328  time_thread = new_time_thread;
329  time_real = new_time_real;
330  allocated = new_allocated;
331  deallocated = new_deallocated;
332 }
333 
335 #ifdef DEBUG_THREAD_CONCURRENCY
336  assert(std::this_thread::get_id() == id);
337 #endif // DEBUG_THREAD_CONCURRENCY
338  auto new_time_thread = boost::chrono::thread_clock::now();
339  auto new_time_real = boost::chrono::high_resolution_clock::now();
340  auto new_allocated = memory_usage::allocated();
341  auto new_deallocated = memory_usage::deallocated();
342  store.time_thread += new_time_thread - time_thread;
343  store.time_real += new_time_real - time_real;
344  store.allocated += new_allocated - allocated;
345  store.deallocated += new_deallocated - deallocated;
346  time_thread = new_time_thread;
347  time_real = new_time_real;
348  allocated = new_allocated;
349  deallocated = new_deallocated;
350 }
351 
353 #ifdef DEBUG_THREAD_CONCURRENCY
354  assert(std::this_thread::get_id() == id);
355 #endif // DEBUG_THREAD_CONCURRENCY
356  auto new_time_thread = boost::chrono::thread_clock::now();
357  auto new_time_real = boost::chrono::high_resolution_clock::now();
358  auto new_allocated = memory_usage::allocated();
359  auto new_deallocated = memory_usage::deallocated();
360  store.time_thread += boost::chrono::duration_cast<boost::chrono::nanoseconds>(new_time_thread - time_thread).count();
361  store.time_real += boost::chrono::duration_cast<boost::chrono::nanoseconds>(new_time_real - time_real).count();
362  store.allocated += new_allocated - allocated;
363  store.deallocated += new_deallocated - deallocated;
364  time_thread = new_time_thread;
365  time_real = new_time_real;
366  allocated = new_allocated;
367  deallocated = new_deallocated;
368 }
369 
371 
373  std::string const& name,
374  std::string const& title,
375  PlotRanges const& ranges,
376  unsigned int lumisections,
377  bool byls) {
378  int time_bins = (int)std::ceil(ranges.time_range / ranges.time_resolution);
379  int mem_bins = (int)std::ceil(ranges.memory_range / ranges.memory_resolution);
380  std::string y_title_ms = (boost::format("events / %.1f ms") % ranges.time_resolution).str();
381  std::string y_title_kB = (boost::format("events / %.1f kB") % ranges.memory_resolution).str();
382 
383  time_thread_ =
384  booker.book1D(name + " time_thread", title + " processing time (cpu)", time_bins, 0., ranges.time_range);
385  time_thread_->setXTitle("processing time [ms]");
386  time_thread_->setYTitle(y_title_ms);
387 
388  time_real_ = booker.book1D(name + " time_real", title + " processing time (real)", time_bins, 0., ranges.time_range);
389  time_real_->setXTitle("processing time [ms]");
390  time_real_->setYTitle(y_title_ms);
391 
393  allocated_ = booker.book1D(name + " allocated", title + " allocated memory", mem_bins, 0., ranges.memory_range);
394  allocated_->setXTitle("memory [kB]");
395  allocated_->setYTitle(y_title_kB);
396 
397  deallocated_ =
398  booker.book1D(name + " deallocated", title + " deallocated memory", mem_bins, 0., ranges.memory_range);
399  deallocated_->setXTitle("memory [kB]");
400  deallocated_->setYTitle(y_title_kB);
401  }
402 
403  if (not byls)
404  return;
405 
406  time_thread_byls_ = booker.bookProfile(name + " time_thread_byls",
407  title + " processing time (cpu) vs. lumisection",
408  lumisections,
409  0.5,
410  lumisections + 0.5,
411  time_bins,
412  0.,
414  " ");
415  time_thread_byls_->setXTitle("lumisection");
416  time_thread_byls_->setYTitle("processing time [ms]");
417 
418  time_real_byls_ = booker.bookProfile(name + " time_real_byls",
419  title + " processing time (real) vs. lumisection",
420  lumisections,
421  0.5,
422  lumisections + 0.5,
423  time_bins,
424  0.,
426  " ");
427  time_real_byls_->setXTitle("lumisection");
428  time_real_byls_->setYTitle("processing time [ms]");
429 
431  allocated_byls_ = booker.bookProfile(name + " allocated_byls",
432  title + " allocated memory vs. lumisection",
433  lumisections,
434  0.5,
435  lumisections + 0.5,
436  mem_bins,
437  0.,
439  " ");
440  allocated_byls_->setXTitle("lumisection");
441  allocated_byls_->setYTitle("memory [kB]");
442 
443  deallocated_byls_ = booker.bookProfile(name + " deallocated_byls",
444  title + " deallocated memory vs. lumisection",
445  lumisections,
446  0.5,
447  lumisections + 0.5,
448  mem_bins,
449  0.,
451  " ");
452  deallocated_byls_->setXTitle("lumisection");
453  deallocated_byls_->setYTitle("memory [kB]");
454  }
455 }
456 
457 void FastTimerService::PlotsPerElement::fill(Resources const& data, unsigned int lumisection) {
458  // enable underflows and overflows in the computation of mean and rms
459  TH1::StatOverflows(true);
460 
461  if (time_thread_)
462  time_thread_->Fill(ms(data.time_thread));
463 
464  if (time_thread_byls_)
465  time_thread_byls_->Fill(lumisection, ms(data.time_thread));
466 
467  if (time_real_)
468  time_real_->Fill(ms(data.time_real));
469 
470  if (time_real_byls_)
471  time_real_byls_->Fill(lumisection, ms(data.time_real));
472 
473  if (allocated_)
474  allocated_->Fill(kB(data.allocated));
475 
476  if (allocated_byls_)
477  allocated_byls_->Fill(lumisection, kB(data.allocated));
478 
479  if (deallocated_)
480  deallocated_->Fill(kB(data.deallocated));
481 
482  if (deallocated_byls_)
483  deallocated_byls_->Fill(lumisection, kB(data.deallocated));
484 }
485 
486 void FastTimerService::PlotsPerElement::fill(AtomicResources const& data, unsigned int lumisection) {
487  // enable underflows and overflows in the computation of mean and rms
488  TH1::StatOverflows(true);
489 
490  if (time_thread_)
491  time_thread_->Fill(ms(boost::chrono::nanoseconds(data.time_thread.load())));
492 
493  if (time_thread_byls_)
494  time_thread_byls_->Fill(lumisection, ms(boost::chrono::nanoseconds(data.time_thread.load())));
495 
496  if (time_real_)
497  time_real_->Fill(ms(boost::chrono::nanoseconds(data.time_real.load())));
498 
499  if (time_real_byls_)
500  time_real_byls_->Fill(lumisection, ms(boost::chrono::nanoseconds(data.time_real.load())));
501 
502  if (allocated_)
503  allocated_->Fill(kB(data.allocated));
504 
505  if (allocated_byls_)
506  allocated_byls_->Fill(lumisection, kB(data.allocated));
507 
508  if (deallocated_)
509  deallocated_->Fill(kB(data.deallocated));
510 
511  if (deallocated_byls_)
512  deallocated_byls_->Fill(lumisection, kB(data.deallocated));
513 }
514 
516  Resources const& part,
517  unsigned int lumisection) {
518  // enable underflows and overflows in the computation of mean and rms
519  TH1::StatOverflows(true);
520 
521  float total;
522  float fraction;
523 
524  total = ms(data.time_thread);
525  fraction = (total > 0.) ? (ms(part.time_thread) / total) : 0.;
526  if (time_thread_)
527  time_thread_->Fill(total, fraction);
528 
529  if (time_thread_byls_)
530  time_thread_byls_->Fill(lumisection, total, fraction);
531 
532  total = ms(data.time_real);
533  fraction = (total > 0.) ? (ms(part.time_real) / total) : 0.;
534  if (time_real_)
535  time_real_->Fill(total, fraction);
536 
537  if (time_real_byls_)
538  time_real_byls_->Fill(lumisection, total, fraction);
539 
540  total = kB(data.allocated);
541  fraction = (total > 0.) ? (kB(part.allocated) / total) : 0.;
542  if (allocated_)
543  allocated_->Fill(total, fraction);
544 
545  if (allocated_byls_)
546  allocated_byls_->Fill(lumisection, total, fraction);
547 
548  total = kB(data.deallocated);
549  fraction = (total > 0.) ? (kB(part.deallocated) / total) : 0.;
550  if (deallocated_)
551  deallocated_->Fill(total, fraction);
552 
553  if (deallocated_byls_)
554  deallocated_byls_->Fill(lumisection, total, fraction);
555 }
556 
558  std::string const& prefixDir,
559  ProcessCallGraph const& job,
561  PlotRanges const& ranges,
562  unsigned int lumisections,
563  bool byls) {
564  const std::string basedir = booker.pwd();
565  // booker.setCurrentFolder(basedir + "/path " + path.name_);
566  booker.setCurrentFolder(basedir + "/" + prefixDir + path.name_);
567 
568  total_.book(booker, "path", path.name_, ranges, lumisections, byls);
569 
570  unsigned int bins = path.modules_and_dependencies_.size();
571  module_counter_ = booker.book1DD("module_counter", "module counter", bins + 1, -0.5, bins + 0.5);
572  module_counter_->setYTitle("events");
573  module_time_thread_total_ =
574  booker.book1DD("module_time_thread_total", "total module time (cpu)", bins, -0.5, bins - 0.5);
575  module_time_thread_total_->setYTitle("processing time [ms]");
576  module_time_real_total_ =
577  booker.book1DD("module_time_real_total", "total module time (real)", bins, -0.5, bins - 0.5);
578  module_time_real_total_->setYTitle("processing time [ms]");
580  module_allocated_total_ =
581  booker.book1DD("module_allocated_total", "total allocated memory", bins, -0.5, bins - 0.5);
582  module_allocated_total_->setYTitle("memory [kB]");
583  module_deallocated_total_ =
584  booker.book1DD("module_deallocated_total", "total deallocated memory", bins, -0.5, bins - 0.5);
585  module_deallocated_total_->setYTitle("memory [kB]");
586  }
587  for (unsigned int bin : boost::irange(0u, bins)) {
588  auto const& module = job[path.modules_and_dependencies_[bin]];
589  std::string const& label =
590  module.scheduled_ ? module.module_.moduleLabel() : module.module_.moduleLabel() + " (unscheduled)";
591  module_counter_->setBinLabel(bin + 1, label);
592  module_time_thread_total_->setBinLabel(bin + 1, label);
593  module_time_real_total_->setBinLabel(bin + 1, label);
595  module_allocated_total_->setBinLabel(bin + 1, label);
596  module_deallocated_total_->setBinLabel(bin + 1, label);
597  }
598  }
599  module_counter_->setBinLabel(bins + 1, "");
600 
601  booker.setCurrentFolder(basedir);
602 }
603 
605  ResourcesPerJob const& data,
606  ResourcesPerPath const& path,
607  unsigned int ls) {
608  // fill the total path time
609  total_.fill(path.total, ls);
610 
611  // fill the modules that actually ran and the total time spent in each od them
612  for (unsigned int i = 0; i < path.last; ++i) {
613  auto const& module = data.modules[description.modules_and_dependencies_[i]];
614  if (module_counter_)
615  module_counter_->Fill(i);
616 
617  if (module_time_thread_total_)
618  module_time_thread_total_->Fill(i, ms(module.total.time_thread));
619 
620  if (module_time_real_total_)
621  module_time_real_total_->Fill(i, ms(module.total.time_real));
622 
623  if (module_allocated_total_)
624  module_allocated_total_->Fill(i, kB(module.total.allocated));
625 
626  if (module_deallocated_total_)
627  module_deallocated_total_->Fill(i, kB(module.total.deallocated));
628  }
629  if (module_counter_ and path.status)
630  module_counter_->Fill(path.last);
631 }
632 
634  : event_(), paths_(process.paths_.size()), endpaths_(process.endPaths_.size()) {}
635 
637  ProcessCallGraph const& job,
639  PlotRanges const& event_ranges,
640  PlotRanges const& path_ranges,
641  unsigned int lumisections,
642  bool bypath,
643  bool byls) {
644  const std::string basedir = booker.pwd();
645  event_.book(booker, "process " + process.name_, "process " + process.name_, event_ranges, lumisections, byls);
646  if (bypath) {
647  booker.setCurrentFolder(basedir + "/process " + process.name_ + " paths");
648  for (unsigned int id : boost::irange(0ul, paths_.size())) {
649  paths_[id].book(booker, "path ", job, process.paths_[id], path_ranges, lumisections, byls);
650  }
651  for (unsigned int id : boost::irange(0ul, endpaths_.size())) {
652  endpaths_[id].book(booker, "endpath ", job, process.endPaths_[id], path_ranges, lumisections, byls);
653  }
654  booker.setCurrentFolder(basedir);
655  }
656 }
657 
659  ResourcesPerJob const& data,
661  unsigned int ls) {
662  // fill process event plots
663  event_.fill(process.total, ls);
664 
665  // fill all paths plots
666  for (unsigned int id : boost::irange(0ul, paths_.size()))
667  paths_[id].fill(description.paths_[id], data, process.paths[id], ls);
668 
669  // fill all endpaths plots
670  for (unsigned int id : boost::irange(0ul, endpaths_.size()))
671  endpaths_[id].fill(description.endPaths_[id], data, process.endpaths[id], ls);
672 }
673 
674 FastTimerService::PlotsPerJob::PlotsPerJob(ProcessCallGraph const& job, std::vector<GroupOfModules> const& groups)
675  : event_(), event_ex_(), overhead_(), highlight_(groups.size()), modules_(job.size()), processes_() {
676  processes_.reserve(job.processes().size());
677  for (auto const& process : job.processes())
678  processes_.emplace_back(process);
679 }
680 
682  ProcessCallGraph const& job,
683  std::vector<GroupOfModules> const& groups,
684  PlotRanges const& event_ranges,
685  PlotRanges const& path_ranges,
686  PlotRanges const& module_ranges,
687  unsigned int lumisections,
688  bool bymodule,
689  bool bypath,
690  bool byls,
691  bool transitions) {
692  const std::string basedir = booker.pwd();
693 
694  // event summary plots
695  event_.book(booker, "event", "Event", event_ranges, lumisections, byls);
696 
697  event_ex_.book(booker, "explicit", "Event (explicit)", event_ranges, lumisections, byls);
698 
699  overhead_.book(booker, "overhead", "Overhead", event_ranges, lumisections, byls);
700 
701  modules_[job.source().id()].book(booker, "source", "Source", module_ranges, lumisections, byls);
702 
703  if (transitions) {
704  lumi_.book(booker, "lumi", "LumiSection transitions", event_ranges, lumisections, byls);
705 
706  run_.book(booker, "run", "Run transtions", event_ranges, lumisections, false);
707  }
708 
709  // plot the time spent in few given groups of modules
710  for (unsigned int group : boost::irange(0ul, groups.size())) {
711  auto const& label = groups[group].label;
712  highlight_[group].book(booker, "highlight " + label, "Highlight " + label, event_ranges, lumisections, byls);
713  }
714 
715  // plots per subprocess (event, modules, paths and endpaths)
716  for (unsigned int pid : boost::irange(0ul, job.processes().size())) {
717  auto const& process = job.processDescription(pid);
718  processes_[pid].book(booker, job, process, event_ranges, path_ranges, lumisections, bypath, byls);
719 
720  if (bymodule) {
721  booker.setCurrentFolder(basedir + "/process " + process.name_ + " modules");
722  for (unsigned int id : process.modules_) {
723  auto const& module_name = job.module(id).moduleLabel();
724  modules_[id].book(booker, module_name, module_name, module_ranges, lumisections, byls);
725  }
726  booker.setCurrentFolder(basedir);
727  }
728  }
729 }
730 
732  // fill total event plots
733  event_.fill(data.total, ls);
734  event_ex_.fill(data.event, ls);
735  overhead_.fill(data.overhead, ls);
736 
737  // fill highltight plots
738  for (unsigned int group : boost::irange(0ul, highlight_.size()))
739  highlight_[group].fill_fraction(data.total, data.highlight[group], ls);
740 
741  // fill modules plots
742  for (unsigned int id : boost::irange(0ul, modules_.size()))
743  modules_[id].fill(data.modules[id].total, ls);
744 
745  for (unsigned int pid : boost::irange(0ul, processes_.size()))
746  processes_[pid].fill(job.processDescription(pid), data, data.processes[pid], ls);
747 }
748 
750  // fill run transition plots
751  run_.fill(data, 0);
752 }
753 
755  // fill lumisection transition plots
756  lumi_.fill(data, ls);
757 }
758 
760 
762  : // configuration
763  callgraph_(),
764  // job configuration
766  concurrent_runs_(0),
769  print_event_summary_(config.getUntrackedParameter<bool>("printEventSummary")),
770  print_run_summary_(config.getUntrackedParameter<bool>("printRunSummary")),
771  print_job_summary_(config.getUntrackedParameter<bool>("printJobSummary")),
772  // JSON configuration
773  //write_json_per_event_(config.getUntrackedParameter<bool>("writeJSONByEvent")),
774  //write_json_per_ls_(config.getUntrackedParameter<bool>("writeJSONByLumiSection")),
775  //write_json_per_run_(config.getUntrackedParameter<bool>("writeJSONByRun")),
776  write_json_summary_(config.getUntrackedParameter<bool>("writeJSONSummary")),
777  json_filename_(config.getUntrackedParameter<std::string>("jsonFileName")),
778  // DQM configuration
779  enable_dqm_(config.getUntrackedParameter<bool>("enableDQM")),
780  enable_dqm_bymodule_(config.getUntrackedParameter<bool>("enableDQMbyModule")),
781  enable_dqm_bypath_(config.getUntrackedParameter<bool>("enableDQMbyPath")),
782  enable_dqm_byls_(config.getUntrackedParameter<bool>("enableDQMbyLumiSection")),
783  enable_dqm_bynproc_(config.getUntrackedParameter<bool>("enableDQMbyProcesses")),
784  enable_dqm_transitions_(config.getUntrackedParameter<bool>("enableDQMTransitions")),
785  dqm_event_ranges_({config.getUntrackedParameter<double>("dqmTimeRange"), // ms
786  config.getUntrackedParameter<double>("dqmTimeResolution"), // ms
787  config.getUntrackedParameter<double>("dqmMemoryRange"), // kB
788  config.getUntrackedParameter<double>("dqmMemoryResolution")}), // kB
789  dqm_path_ranges_({config.getUntrackedParameter<double>("dqmPathTimeRange"), // ms
790  config.getUntrackedParameter<double>("dqmPathTimeResolution"), // ms
791  config.getUntrackedParameter<double>("dqmPathMemoryRange"), // kB
792  config.getUntrackedParameter<double>("dqmPathMemoryResolution")}), // kB
793  dqm_module_ranges_({config.getUntrackedParameter<double>("dqmModuleTimeRange"), // ms
794  config.getUntrackedParameter<double>("dqmModuleTimeResolution"), // ms
795  config.getUntrackedParameter<double>("dqmModuleMemoryRange"), // kB
796  config.getUntrackedParameter<double>("dqmModuleMemoryResolution")}), // kB
797  dqm_lumisections_range_(config.getUntrackedParameter<unsigned int>("dqmLumiSectionsRange")),
798  dqm_path_(config.getUntrackedParameter<std::string>("dqmPath")),
799  // highlight configuration
800  highlight_module_psets_(config.getUntrackedParameter<std::vector<edm::ParameterSet>>("highlightModules")),
801  highlight_modules_(highlight_module_psets_.size()) // filled in postBeginJob()
802 {
803  // start observing when a thread enters or leaves the TBB global thread arena
804  tbb::task_scheduler_observer::observe();
805 
806  // register EDM call backs
807  registry.watchPreallocate(this, &FastTimerService::preallocate);
808  registry.watchPreBeginJob(this, &FastTimerService::preBeginJob);
809  registry.watchPostBeginJob(this, &FastTimerService::postBeginJob);
810  registry.watchPostEndJob(this, &FastTimerService::postEndJob);
811  registry.watchPreGlobalBeginRun(this, &FastTimerService::preGlobalBeginRun);
812  //registry.watchPostGlobalBeginRun( this, & FastTimerService::postGlobalBeginRun );
813  //registry.watchPreGlobalEndRun( this, & FastTimerService::preGlobalEndRun );
814  registry.watchPostGlobalEndRun(this, &FastTimerService::postGlobalEndRun);
815  registry.watchPreStreamBeginRun(this, &FastTimerService::preStreamBeginRun);
816  //registry.watchPostStreamBeginRun( this, & FastTimerService::postStreamBeginRun );
817  //registry.watchPreStreamEndRun( this, & FastTimerService::preStreamEndRun );
818  registry.watchPostStreamEndRun(this, &FastTimerService::postStreamEndRun);
819  registry.watchPreGlobalBeginLumi(this, &FastTimerService::preGlobalBeginLumi);
820  //registry.watchPostGlobalBeginLumi( this, & FastTimerService::postGlobalBeginLumi );
821  //registry.watchPreGlobalEndLumi( this, & FastTimerService::preGlobalEndLumi );
822  registry.watchPostGlobalEndLumi(this, &FastTimerService::postGlobalEndLumi);
823  registry.watchPreStreamBeginLumi(this, &FastTimerService::preStreamBeginLumi);
824  //registry.watchPostStreamBeginLumi( this, & FastTimerService::postStreamBeginLumi );
825  //registry.watchPreStreamEndLumi( this, & FastTimerService::preStreamEndLumi );
826  registry.watchPostStreamEndLumi(this, &FastTimerService::postStreamEndLumi);
827  registry.watchPreEvent(this, &FastTimerService::preEvent);
828  registry.watchPostEvent(this, &FastTimerService::postEvent);
829  registry.watchPrePathEvent(this, &FastTimerService::prePathEvent);
830  registry.watchPostPathEvent(this, &FastTimerService::postPathEvent);
831  registry.watchPreSourceConstruction(this, &FastTimerService::preSourceConstruction);
832  //registry.watchPostSourceConstruction( this, & FastTimerService::postSourceConstruction);
833  registry.watchPreSourceRun(this, &FastTimerService::preSourceRun);
834  registry.watchPostSourceRun(this, &FastTimerService::postSourceRun);
835  registry.watchPreSourceLumi(this, &FastTimerService::preSourceLumi);
836  registry.watchPostSourceLumi(this, &FastTimerService::postSourceLumi);
837  registry.watchPreSourceEvent(this, &FastTimerService::preSourceEvent);
838  registry.watchPostSourceEvent(this, &FastTimerService::postSourceEvent);
839  //registry.watchPreModuleConstruction( this, & FastTimerService::preModuleConstruction);
840  //registry.watchPostModuleConstruction( this, & FastTimerService::postModuleConstruction);
841  //registry.watchPreModuleBeginJob( this, & FastTimerService::preModuleBeginJob );
842  //registry.watchPostModuleBeginJob( this, & FastTimerService::postModuleBeginJob );
843  //registry.watchPreModuleEndJob( this, & FastTimerService::preModuleEndJob );
844  //registry.watchPostModuleEndJob( this, & FastTimerService::postModuleEndJob );
845  //registry.watchPreModuleBeginStream( this, & FastTimerService::preModuleBeginStream );
846  //registry.watchPostModuleBeginStream( this, & FastTimerService::postModuleBeginStream );
847  //registry.watchPreModuleEndStream( this, & FastTimerService::preModuleEndStream );
848  //registry.watchPostModuleEndStream( this, & FastTimerService::postModuleEndStream );
849  registry.watchPreModuleGlobalBeginRun(this, &FastTimerService::preModuleGlobalBeginRun);
850  registry.watchPostModuleGlobalBeginRun(this, &FastTimerService::postModuleGlobalBeginRun);
851  registry.watchPreModuleGlobalEndRun(this, &FastTimerService::preModuleGlobalEndRun);
852  registry.watchPostModuleGlobalEndRun(this, &FastTimerService::postModuleGlobalEndRun);
853  registry.watchPreModuleGlobalBeginLumi(this, &FastTimerService::preModuleGlobalBeginLumi);
854  registry.watchPostModuleGlobalBeginLumi(this, &FastTimerService::postModuleGlobalBeginLumi);
855  registry.watchPreModuleGlobalEndLumi(this, &FastTimerService::preModuleGlobalEndLumi);
856  registry.watchPostModuleGlobalEndLumi(this, &FastTimerService::postModuleGlobalEndLumi);
857  registry.watchPreModuleStreamBeginRun(this, &FastTimerService::preModuleStreamBeginRun);
858  registry.watchPostModuleStreamBeginRun(this, &FastTimerService::postModuleStreamBeginRun);
859  registry.watchPreModuleStreamEndRun(this, &FastTimerService::preModuleStreamEndRun);
860  registry.watchPostModuleStreamEndRun(this, &FastTimerService::postModuleStreamEndRun);
861  registry.watchPreModuleStreamBeginLumi(this, &FastTimerService::preModuleStreamBeginLumi);
862  registry.watchPostModuleStreamBeginLumi(this, &FastTimerService::postModuleStreamBeginLumi);
863  registry.watchPreModuleStreamEndLumi(this, &FastTimerService::preModuleStreamEndLumi);
864  registry.watchPostModuleStreamEndLumi(this, &FastTimerService::postModuleStreamEndLumi);
865  //registry.watchPreModuleEventPrefetching( this, & FastTimerService::preModuleEventPrefetching );
866  //registry.watchPostModuleEventPrefetching( this, & FastTimerService::postModuleEventPrefetching );
867  registry.watchPreModuleEventAcquire(this, &FastTimerService::preModuleEventAcquire);
868  registry.watchPostModuleEventAcquire(this, &FastTimerService::postModuleEventAcquire);
869  registry.watchPreModuleEvent(this, &FastTimerService::preModuleEvent);
870  registry.watchPostModuleEvent(this, &FastTimerService::postModuleEvent);
871  registry.watchPreModuleEventDelayedGet(this, &FastTimerService::preModuleEventDelayedGet);
872  registry.watchPostModuleEventDelayedGet(this, &FastTimerService::postModuleEventDelayedGet);
873  //registry.watchPreEventReadFromSource( this, & FastTimerService::preEventReadFromSource );
874  //registry.watchPostEventReadFromSource( this, & FastTimerService::postEventReadFromSource );
875 }
876 
877 void FastTimerService::ignoredSignal(const std::string& signal) const {
878  LogDebug("FastTimerService") << "The FastTimerService received is currently not monitoring the signal \"" << signal
879  << "\".\n";
880 }
881 
883  // warn about each signal only once per job
884  if (unsupported_signals_.insert(signal).second)
885  edm::LogWarning("FastTimerService") << "The FastTimerService received the unsupported signal \"" << signal
886  << "\".\n"
887  << "Please report how to reproduce the issue to cms-hlt@cern.ch .";
888 }
889 
891  ignoredSignal(__func__);
892 
893  // reset the run counters only during the main process being run
894  if (isFirstSubprocess(gc)) {
895  auto index = gc.runIndex();
896  subprocess_global_run_check_[index] = 0;
897  run_transition_[index].reset();
898  run_summary_[index].reset();
899 
900  // book the DQM plots
901  if (enable_dqm_) {
902  // define a callback to book the MonitorElements
903  auto bookTransactionCallback = [&, this](dqm::reco::DQMStore::IBooker& booker, dqm::reco::DQMStore::IGetter&) {
904  auto scope = dqm::reco::DQMStore::IBooker::UseRunScope(booker);
905  // we should really do this, but only DQMStore is allowed to touch it
906  // We could move to postGlobalBeginRun, then the DQMStore has sure set it up.
907  //booker.setRunLumi(gc.luminosityBlockID());
908  booker.setCurrentFolder(dqm_path_);
909  plots_->book(booker,
910  callgraph_,
911  highlight_modules_,
912  dqm_event_ranges_,
913  dqm_path_ranges_,
914  dqm_module_ranges_,
915  dqm_lumisections_range_,
916  enable_dqm_bymodule_,
917  enable_dqm_bypath_,
918  enable_dqm_byls_,
919  enable_dqm_transitions_);
920  };
921 
922  // book MonitorElements for this stream
923  edm::Service<dqm::legacy::DQMStore>()->meBookerGetter(bookTransactionCallback);
924  }
925  }
926 }
927 
928 void FastTimerService::postGlobalBeginRun(edm::GlobalContext const& gc) { ignoredSignal(__func__); }
929 
930 void FastTimerService::preStreamBeginRun(edm::StreamContext const& sc) { ignoredSignal(__func__); }
931 
933  concurrent_lumis_ = bounds.maxNumberOfConcurrentLuminosityBlocks();
934  concurrent_runs_ = bounds.maxNumberOfConcurrentRuns();
935  concurrent_streams_ = bounds.maxNumberOfStreams();
936  concurrent_threads_ = bounds.maxNumberOfThreads();
937 
938  if (enable_dqm_bynproc_)
939  dqm_path_ += (boost::format("/Running on %s with %d streams on %d threads") % processor_model %
940  concurrent_streams_ % concurrent_threads_)
941  .str();
942 
943  // clean characters that are deemed unsafe for DQM
944  // see the definition of `s_safe` in DQMServices/Core/src/DQMStore.cc
945  auto safe_for_dqm = "/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+=_()# "s;
946  for (auto& c : dqm_path_)
947  if (safe_for_dqm.find(c) == std::string::npos)
948  c = '_';
949 
950  // allocate atomic variables to keep track of the completion of each step, process by process
951  subprocess_event_check_ = std::make_unique<std::atomic<unsigned int>[]>(concurrent_streams_);
952  for (unsigned int i = 0; i < concurrent_streams_; ++i)
953  subprocess_event_check_[i] = 0;
954  subprocess_global_run_check_ = std::make_unique<std::atomic<unsigned int>[]>(concurrent_runs_);
955  for (unsigned int i = 0; i < concurrent_runs_; ++i)
956  subprocess_global_run_check_[i] = 0;
957  subprocess_global_lumi_check_ = std::make_unique<std::atomic<unsigned int>[]>(concurrent_lumis_);
958  for (unsigned int i = 0; i < concurrent_lumis_; ++i)
959  subprocess_global_lumi_check_[i] = 0;
960 
961  // allocate buffers to keep track of the resources spent in the lumi and run transitions
962  lumi_transition_.resize(concurrent_lumis_);
963  run_transition_.resize(concurrent_runs_);
964 }
965 
967  callgraph_.preSourceConstruction(module);
968 }
969 
971  edm::ProcessContext const& context) {
972  callgraph_.preBeginJob(pathsAndConsumes, context);
973 }
974 
976  unsigned int modules = callgraph_.size();
977 
978  // module highlights
979  for (unsigned int group : boost::irange(0ul, highlight_module_psets_.size())) {
980  // copy and sort for faster search via std::binary_search
981  auto labels = highlight_module_psets_[group].getUntrackedParameter<std::vector<std::string>>("modules");
982  std::sort(labels.begin(), labels.end());
983 
984  highlight_modules_[group].label = highlight_module_psets_[group].getUntrackedParameter<std::string>("label");
985  highlight_modules_[group].modules.reserve(labels.size());
986  // convert the module labels in module ids
987  for (unsigned int i = 0; i < modules; ++i) {
988  auto const& label = callgraph_.module(i).moduleLabel();
989  if (std::binary_search(labels.begin(), labels.end(), label))
990  highlight_modules_[group].modules.push_back(i);
991  }
992  }
993  highlight_module_psets_.clear();
994 
995  // allocate the resource counters for each stream, process, path and module
996  ResourcesPerJob temp(callgraph_, highlight_modules_);
997  streams_.resize(concurrent_streams_, temp);
998  run_summary_.resize(concurrent_runs_, temp);
999  job_summary_ = temp;
1000 
1001  // check that the DQMStore service is available
1002  if (enable_dqm_ and not edm::Service<dqm::legacy::DQMStore>().isAvailable()) {
1003  // the DQMStore is not available, disable all DQM plots
1004  enable_dqm_ = false;
1005  edm::LogWarning("FastTimerService") << "The DQMStore is not avalable, the DQM plots will not be generated";
1006  }
1007 
1008  // allocate the structures to hold pointers to the DQM plots
1009  if (enable_dqm_) {
1010  plots_ = std::make_unique<PlotsPerJob>(callgraph_, highlight_modules_);
1011  }
1012 }
1013 
1014 void FastTimerService::postStreamBeginRun(edm::StreamContext const& sc) { ignoredSignal(__func__); }
1015 
1016 void FastTimerService::preStreamEndRun(edm::StreamContext const& sc) { ignoredSignal(__func__); }
1017 
1018 void FastTimerService::postStreamEndRun(edm::StreamContext const& sc) { ignoredSignal(__func__); }
1019 
1021  ignoredSignal(__func__);
1022 
1023  // reset the lumi counters only during the main process being run
1024  if (isFirstSubprocess(gc)) {
1025  auto index = gc.luminosityBlockIndex();
1026  subprocess_global_lumi_check_[index] = 0;
1027  lumi_transition_[index].reset();
1028  }
1029 }
1030 
1031 void FastTimerService::postGlobalBeginLumi(edm::GlobalContext const& gc) { ignoredSignal(__func__); }
1032 
1033 void FastTimerService::preGlobalEndLumi(edm::GlobalContext const& gc) { ignoredSignal(__func__); }
1034 
1036  ignoredSignal(__func__);
1037 
1038  // handle the summaries only after the last subprocess has run
1039  auto index = gc.luminosityBlockIndex();
1040  bool last = isLastSubprocess(subprocess_global_lumi_check_[index]);
1041  if (not last)
1042  return;
1043 
1044  edm::LogVerbatim out("FastReport");
1045  auto const& label = (boost::format("run %d, lumisection %d") % gc.luminosityBlockID().run() %
1047  .str();
1048  printTransition(out, lumi_transition_[index], label);
1049 
1050  if (enable_dqm_transitions_) {
1051  plots_->fill_lumi(lumi_transition_[index], gc.luminosityBlockID().luminosityBlock());
1052  }
1053 }
1054 
1055 void FastTimerService::preStreamBeginLumi(edm::StreamContext const& sc) { ignoredSignal(__func__); }
1056 
1057 void FastTimerService::postStreamBeginLumi(edm::StreamContext const& sc) { ignoredSignal(__func__); }
1058 
1059 void FastTimerService::preStreamEndLumi(edm::StreamContext const& sc) { ignoredSignal(__func__); }
1060 
1061 void FastTimerService::postStreamEndLumi(edm::StreamContext const& sc) { ignoredSignal(__func__); }
1062 
1063 void FastTimerService::preGlobalEndRun(edm::GlobalContext const& gc) { ignoredSignal(__func__); }
1064 
1066  ignoredSignal(__func__);
1067 
1068  // handle the summaries only after the last subprocess has run
1069  auto index = gc.runIndex();
1070  bool last = isLastSubprocess(subprocess_global_run_check_[index]);
1071  if (not last)
1072  return;
1073 
1074  edm::LogVerbatim out("FastReport");
1075  auto const& label = (boost::format("Run %d") % gc.luminosityBlockID().run()).str();
1076  if (print_run_summary_) {
1077  printSummary(out, run_summary_[index], label);
1078  }
1079  printTransition(out, run_transition_[index], label);
1080 
1081  if (enable_dqm_transitions_) {
1082  plots_->fill_run(run_transition_[index]);
1083  }
1084 }
1085 
1086 void FastTimerService::preSourceRun(edm::RunIndex index) { thread().measure_and_accumulate(overhead_); }
1087 
1088 void FastTimerService::postSourceRun(edm::RunIndex index) { thread().measure_and_accumulate(run_transition_[index]); }
1089 
1090 void FastTimerService::preSourceLumi(edm::LuminosityBlockIndex index) { thread().measure_and_accumulate(overhead_); }
1091 
1093  thread().measure_and_accumulate(lumi_transition_[index]);
1094 }
1095 
1097  if (print_job_summary_) {
1098  edm::LogVerbatim out("FastReport");
1099  printSummary(out, job_summary_, "Job");
1100  }
1101  if (write_json_summary_) {
1102  writeSummaryJSON(job_summary_, json_filename_);
1103  }
1104 }
1105 
1106 template <typename T>
1108  out << "FastReport ";
1109  if (label.size() < 60)
1110  for (unsigned int i = (60 - label.size()) / 2; i > 0; --i)
1111  out << '-';
1112  out << ' ' << label << " Summary ";
1113  if (label.size() < 60)
1114  for (unsigned int i = (59 - label.size()) / 2; i > 0; --i)
1115  out << '-';
1116  out << '\n';
1117 }
1118 
1119 template <typename T>
1121  out << "FastReport CPU time Real time Allocated Deallocated " << label << "\n";
1122  // FastReport ########.# ms ########.# ms +######### kB -######### kB ...
1123 }
1124 
1125 template <typename T>
1127  out << boost::format("FastReport %10.1f ms %10.1f ms %+10d kB %+10d kB %s\n") % ms(data.time_thread) %
1128  ms(data.time_real) % +static_cast<int64_t>(kB(data.allocated)) %
1129  -static_cast<int64_t>(kB(data.deallocated)) % label;
1130 }
1131 
1132 template <typename T>
1134  out << boost::format("FastReport %10.1f ms %10.1f ms %+10d kB %+10d kB %s\n") %
1135  ms(boost::chrono::nanoseconds(data.time_thread.load())) %
1136  ms(boost::chrono::nanoseconds(data.time_real.load())) % +static_cast<int64_t>(kB(data.allocated)) %
1137  -static_cast<int64_t>(kB(data.deallocated)) % label;
1138 }
1139 
1140 template <typename T>
1142  printHeader(out, "Event");
1143  printEventHeader(out, "Modules");
1144  auto const& source_d = callgraph_.source();
1145  auto const& source = data.modules[source_d.id()];
1146  printEventLine(out, source.total, source_d.moduleLabel());
1147  for (unsigned int i = 0; i < callgraph_.processes().size(); ++i) {
1148  auto const& proc_d = callgraph_.processDescription(i);
1149  auto const& proc = data.processes[i];
1150  printEventLine(out, proc.total, "process " + proc_d.name_);
1151  for (unsigned int m : proc_d.modules_) {
1152  auto const& module_d = callgraph_.module(m);
1153  auto const& module = data.modules[m];
1154  printEventLine(out, module.total, " " + module_d.moduleLabel());
1155  }
1156  }
1157  printEventLine(out, data.total, "total");
1158  out << '\n';
1159  printEventHeader(out, "Processes and Paths");
1160  printEventLine(out, source.total, source_d.moduleLabel());
1161  for (unsigned int i = 0; i < callgraph_.processes().size(); ++i) {
1162  auto const& proc_d = callgraph_.processDescription(i);
1163  auto const& proc = data.processes[i];
1164  printEventLine(out, proc.total, "process " + proc_d.name_);
1165  for (unsigned int p = 0; p < proc.paths.size(); ++p) {
1166  auto const& name = proc_d.paths_[p].name_;
1167  auto const& path = proc.paths[p];
1168  printEventLine(out, path.active, name + " (only scheduled modules)");
1169  printEventLine(out, path.total, name + " (including dependencies)");
1170  }
1171  for (unsigned int p = 0; p < proc.endpaths.size(); ++p) {
1172  auto const& name = proc_d.endPaths_[p].name_;
1173  auto const& path = proc.endpaths[p];
1174  printEventLine(out, path.active, name + " (only scheduled modules)");
1175  printEventLine(out, path.total, name + " (including dependencies)");
1176  }
1177  }
1178  printEventLine(out, data.total, "total");
1179  out << '\n';
1180  for (unsigned int group : boost::irange(0ul, highlight_modules_.size())) {
1181  printEventHeader(out, "Highlighted modules");
1182  for (unsigned int m : highlight_modules_[group].modules) {
1183  auto const& module_d = callgraph_.module(m);
1184  auto const& module = data.modules[m];
1185  printEventLine(out, module.total, " " + module_d.moduleLabel());
1186  }
1187  printEventLine(out, data.highlight[group], highlight_modules_[group].label);
1188  out << '\n';
1189  }
1190 }
1191 
1192 template <typename T>
1193 void FastTimerService::printSummaryHeader(T& out, std::string const& label, bool detailed) const {
1194  if (detailed)
1195  out << "FastReport CPU time avg. when run Real time avg. when run Alloc. avg. when run "
1196  "Dealloc. avg. when run ";
1197  // FastReport ########.# ms ########.# ms ########.# ms ########.# ms +######### kB +######### kB -######### kB -######### kB ...
1198  else
1199  out << "FastReport CPU time avg. Real time avg. Alloc. avg. "
1200  "Dealloc. avg. ";
1201  // FastReport ########.# ms ########.# ms +######### kB -######### kB ...
1202  out << label << '\n';
1203 }
1204 
1205 template <typename T>
1207  out << "FastReport CPU time sched. / depend. Real time sched. / depend. Alloc. sched. / depend. "
1208  "Dealloc. sched. / depend. ";
1209  // FastReport ########.# ms ########.# ms ########.# ms ########.# ms +######### kB +######### kB -######### kB -######### kB ...
1210  out << label << '\n';
1211 }
1212 
1213 template <typename T>
1215  out << boost::format(
1216  "FastReport %10.1f ms %10.1f ms %+10d kB %+10d kB "
1217  " %s\n") %
1218  (events ? ms(data.time_thread) / events : 0) % (events ? ms(data.time_real) / events : 0) %
1219  (events ? +static_cast<int64_t>(kB(data.allocated) / events) : 0) %
1220  (events ? -static_cast<int64_t>(kB(data.deallocated) / events) : 0) % label;
1221 }
1222 
1223 template <typename T>
1225  T& out, AtomicResources const& data, uint64_t events, uint64_t active, std::string const& label) const {
1226  out << boost::format(
1227  "FastReport %10.1f ms %10.1f ms %10.1f ms %10.1f ms %+10d kB %+10d kB %+10d kB %+10d kB %s\n") %
1228  (events ? ms(data.time_thread) / events : 0) % (active ? ms(data.time_thread) / active : 0) %
1229  (events ? ms(data.time_real) / events : 0) % (active ? ms(data.time_real) / active : 0) %
1230  (events ? +static_cast<int64_t>(kB(data.allocated) / events) : 0) %
1231  (active ? +static_cast<int64_t>(kB(data.allocated) / active) : 0) %
1232  (events ? -static_cast<int64_t>(kB(data.deallocated) / events) : 0) %
1233  (active ? -static_cast<int64_t>(kB(data.deallocated) / active) : 0) % label;
1234 }
1235 
1236 template <typename T>
1238  AtomicResources const& data,
1239  uint64_t events,
1240  std::string const& label) const {
1241  out << boost::format(
1242  "FastReport %10.1f ms %10.1f ms %+10d kB %+10d kB "
1243  " %s\n") %
1244  (events ? ms(data.time_thread) / events : 0) % (events ? ms(data.time_real) / events : 0) %
1245  (events ? +static_cast<int64_t>(kB(data.allocated) / events) : 0) %
1246  (events ? -static_cast<int64_t>(kB(data.deallocated) / events) : 0) % label;
1247 }
1248 
1249 template <typename T>
1251  T& out, Resources const& data, uint64_t events, uint64_t active, std::string const& label) const {
1252  out << boost::format(
1253  "FastReport %10.1f ms %10.1f ms %10.1f ms %10.1f ms %+10d kB %+10d kB %+10d kB %+10d kB %s\n") %
1254  (events ? ms(data.time_thread) / events : 0) % (active ? ms(data.time_thread) / active : 0) %
1255  (events ? ms(data.time_real) / events : 0) % (active ? ms(data.time_real) / active : 0) %
1256  (events ? +static_cast<int64_t>(kB(data.allocated) / events) : 0) %
1257  (active ? +static_cast<int64_t>(kB(data.allocated) / active) : 0) %
1258  (events ? -static_cast<int64_t>(kB(data.deallocated) / events) : 0) %
1259  (active ? -static_cast<int64_t>(kB(data.deallocated) / active) : 0) % label;
1260 }
1261 
1262 template <typename T>
1264  T& out, Resources const& data, Resources const& total, uint64_t events, std::string const& label) const {
1265  out << boost::format(
1266  "FastReport %10.1f ms %10.1f ms %10.1f ms %10.1f ms %+10d kB %+10d kB %+10d kB %+10d kB %s\n") %
1267  (events ? ms(data.time_thread) / events : 0) % (events ? ms(total.time_thread) / events : 0) %
1268  (events ? ms(data.time_real) / events : 0) % (events ? ms(total.time_real) / events : 0) %
1269  (events ? +static_cast<int64_t>(kB(data.allocated) / events) : 0) %
1270  (events ? +static_cast<int64_t>(kB(total.allocated) / events) : 0) %
1271  (events ? -static_cast<int64_t>(kB(data.deallocated) / events) : 0) %
1272  (events ? -static_cast<int64_t>(kB(total.deallocated) / events) : 0) % label;
1273 }
1274 
1275 template <typename T>
1277  printHeader(out, label);
1278  printSummaryHeader(out, "Modules", true);
1279  auto const& source_d = callgraph_.source();
1280  auto const& source = data.modules[source_d.id()];
1281  printSummaryLine(out, source.total, data.events, source.events, source_d.moduleLabel());
1282  for (unsigned int i = 0; i < callgraph_.processes().size(); ++i) {
1283  auto const& proc_d = callgraph_.processDescription(i);
1284  auto const& proc = data.processes[i];
1285  printSummaryLine(out, proc.total, data.events, "process " + proc_d.name_);
1286  for (unsigned int m : proc_d.modules_) {
1287  auto const& module_d = callgraph_.module(m);
1288  auto const& module = data.modules[m];
1289  printSummaryLine(out, module.total, data.events, module.events, " " + module_d.moduleLabel());
1290  }
1291  }
1292  printSummaryLine(out, data.total, data.events, "total");
1293  printSummaryLine(out, data.overhead, data.events, "other");
1294  out << '\n';
1295  printPathSummaryHeader(out, "Processes and Paths");
1296  printSummaryLine(out, source.total, data.events, source_d.moduleLabel());
1297  for (unsigned int i = 0; i < callgraph_.processes().size(); ++i) {
1298  auto const& proc_d = callgraph_.processDescription(i);
1299  auto const& proc = data.processes[i];
1300  printSummaryLine(out, proc.total, data.events, "process " + proc_d.name_);
1301  for (unsigned int p = 0; p < proc.paths.size(); ++p) {
1302  auto const& name = proc_d.paths_[p].name_;
1303  auto const& path = proc.paths[p];
1304  printPathSummaryLine(out, path.active, path.total, data.events, " " + name);
1305  }
1306  for (unsigned int p = 0; p < proc.endpaths.size(); ++p) {
1307  auto const& name = proc_d.endPaths_[p].name_;
1308  auto const& path = proc.endpaths[p];
1309  printPathSummaryLine(out, path.active, path.total, data.events, " " + name);
1310  }
1311  }
1312  printSummaryLine(out, data.total, data.events, "total");
1313  printSummaryLine(out, data.overhead, data.events, "other");
1314  out << '\n';
1315  for (unsigned int group : boost::irange(0ul, highlight_modules_.size())) {
1316  printSummaryHeader(out, "Highlighted modules", true);
1317  for (unsigned int m : highlight_modules_[group].modules) {
1318  auto const& module_d = callgraph_.module(m);
1319  auto const& module = data.modules[m];
1320  printSummaryLine(out, module.total, data.events, module.events, module_d.moduleLabel());
1321  }
1322  printSummaryLine(out, data.highlight[group], data.events, highlight_modules_[group].label);
1323  out << '\n';
1324  }
1325 }
1326 
1327 template <typename T>
1329  printEventHeader(out, "Transition");
1330  printEventLine(out, data, label);
1331 }
1332 
1333 template <typename T>
1335  std::string const& label,
1336  unsigned int events,
1337  T const& data) const {
1338  return json{{"type", type},
1339  {"label", label},
1340  {"events", events},
1341  {"time_thread", ms(data.time_thread)},
1342  {"time_real", ms(data.time_real)},
1343  {"mem_alloc", kB(data.allocated)},
1344  {"mem_free", kB(data.deallocated)}};
1345 }
1346 
1348  return encodeToJSON(module.moduleName(), module.moduleLabel(), data.events, data.total);
1349 }
1350 
1352  json j;
1353 
1354  // write a description of the resources
1355  j["resources"] = json::array({json{{"time_real", "real time"}},
1356  json{{"time_thread", "cpu time"}},
1357  json{{"mem_alloc", "allocated memory"}},
1358  json{{"mem_free", "deallocated memory"}}});
1359 
1360  // write the resources used by the job
1361  j["total"] = encodeToJSON("Job", callgraph_.processDescription(0).name_, data.events, data.total + data.overhead);
1362 
1363  // write the resources used by every module
1364  j["modules"] = json::array();
1365  for (unsigned int i = 0; i < callgraph_.size(); ++i) {
1366  auto const& module = callgraph_.module(i);
1367  auto const& data_m = data.modules[i];
1368  j["modules"].push_back(encodeToJSON(module, data_m));
1369  }
1370 
1371  // add an entry for the "overhead"
1372  j["modules"].push_back(encodeToJSON("other", "other", data.events, data.overhead));
1373 
1374  std::ofstream out(filename);
1375  out << std::setw(2) << j << std::flush;
1376 }
1377 
1378 // check if this is the first process being signalled
1380  return (not sc.processContext()->isSubProcess());
1381 }
1382 
1384  return (not gc.processContext()->isSubProcess());
1385 }
1386 
1387 // check if this is the last process being signalled
1388 bool FastTimerService::isLastSubprocess(std::atomic<unsigned int>& check) {
1389  // release-acquire semantic guarantees that all writes in this and other threads are visible
1390  // after this operation; full sequentially-consistent ordering is (probably) not needed.
1391  unsigned int old_value = check.fetch_add(1, std::memory_order_acq_rel);
1392  return (old_value == callgraph_.processes().size() - 1);
1393 }
1394 
1395 void FastTimerService::preEvent(edm::StreamContext const& sc) { ignoredSignal(__func__); }
1396 
1398  ignoredSignal(__func__);
1399 
1400  unsigned int pid = callgraph_.processId(*sc.processContext());
1401  unsigned int sid = sc.streamID();
1402  auto& stream = streams_[sid];
1403  auto& process = callgraph_.processDescription(pid);
1404 
1405  // measure the event resources as the sum of all modules' resources
1406  auto& data = stream.processes[pid].total;
1407  for (unsigned int id : process.modules_)
1408  data += stream.modules[id].total;
1409  stream.total += data;
1410 
1411  // handle the summaries and fill the plots only after the last subprocess has run
1412  bool last = isLastSubprocess(subprocess_event_check_[sid]);
1413  if (not last)
1414  return;
1415 
1416  // measure the event resources explicitly
1417  stream.event_measurement.measure_and_store(stream.event);
1418 
1419  // add to the event resources those used by source (which is not part of any process)
1420  unsigned int id = 0;
1421  stream.total += stream.modules[id].total;
1422 
1423  // highlighted modules
1424  for (unsigned int group : boost::irange(0ul, highlight_modules_.size()))
1425  for (unsigned int i : highlight_modules_[group].modules)
1426  stream.highlight[group] += stream.modules[i].total;
1427 
1428  // avoid concurrent access to the summary objects
1429  {
1430  std::lock_guard<std::mutex> guard(summary_mutex_);
1431  job_summary_ += stream;
1432  run_summary_[sc.runIndex()] += stream;
1433  }
1434 
1435  if (print_event_summary_) {
1436  edm::LogVerbatim out("FastReport");
1437  printEvent(out, stream);
1438  }
1439 
1440  if (enable_dqm_) {
1441  plots_->fill(callgraph_, stream, sc.eventID().luminosityBlock());
1442  }
1443 }
1444 
1446  // clear the event counters
1447  auto& stream = streams_[sid];
1448  stream.reset();
1449  ++stream.events;
1450 
1451  subprocess_event_check_[sid] = 0;
1452 
1453  // reuse the same measurement for the Source module and for the explicit begin of the Event
1454  auto& measurement = thread();
1455  measurement.measure_and_accumulate(stream.overhead);
1456  stream.event_measurement = measurement;
1457 }
1458 
1460  edm::ModuleDescription const& md = callgraph_.source();
1461  unsigned int id = md.id();
1462  auto& stream = streams_[sid];
1463  auto& module = stream.modules[id];
1464 
1465  thread().measure_and_store(module.total);
1466  ++stream.modules[id].events;
1467 }
1468 
1470  unsigned int sid = sc.streamID().value();
1471  unsigned int pid = callgraph_.processId(*sc.processContext());
1472  unsigned int id = pc.pathID();
1473  auto& stream = streams_[sid];
1474  auto& data = pc.isEndPath() ? stream.processes[pid].endpaths[id] : stream.processes[pid].paths[id];
1475  data.status = false;
1476  data.last = 0;
1477 }
1478 
1480  edm::PathContext const& pc,
1481  edm::HLTPathStatus const& status) {
1482  unsigned int sid = sc.streamID().value();
1483  unsigned int pid = callgraph_.processId(*sc.processContext());
1484  unsigned int id = pc.pathID();
1485  auto& stream = streams_[sid];
1486  auto& data = pc.isEndPath() ? stream.processes[pid].endpaths[id] : stream.processes[pid].paths[id];
1487 
1488  auto const& path =
1489  pc.isEndPath() ? callgraph_.processDescription(pid).endPaths_[id] : callgraph_.processDescription(pid).paths_[id];
1490  unsigned int index = path.modules_on_path_.empty() ? 0 : status.index() + 1;
1491  data.last = path.modules_on_path_.empty() ? 0 : path.last_dependency_of_module_[status.index()];
1492 
1493  for (unsigned int i = 0; i < index; ++i) {
1494  auto const& module = stream.modules[path.modules_on_path_[i]];
1495  data.active += module.total;
1496  }
1497  for (unsigned int i = 0; i < data.last; ++i) {
1498  auto const& module = stream.modules[path.modules_and_dependencies_[i]];
1499  data.total += module.total;
1500  }
1501 }
1502 
1504  unsigned int sid = sc.streamID().value();
1505  auto& stream = streams_[sid];
1506  thread().measure_and_accumulate(stream.overhead);
1507 }
1508 
1510  edm::ModuleDescription const& md = *mcc.moduleDescription();
1511  unsigned int id = md.id();
1512  unsigned int sid = sc.streamID().value();
1513  auto& stream = streams_[sid];
1514  auto& module = stream.modules[id];
1515 
1516  module.has_acquire = true;
1517  thread().measure_and_store(module.total);
1518 }
1519 
1521  unsigned int sid = sc.streamID().value();
1522  auto& stream = streams_[sid];
1523  thread().measure_and_accumulate(stream.overhead);
1524 }
1525 
1527  edm::ModuleDescription const& md = *mcc.moduleDescription();
1528  unsigned int id = md.id();
1529  unsigned int sid = sc.streamID().value();
1530  auto& stream = streams_[sid];
1531  auto& module = stream.modules[id];
1532 
1533  if (module.has_acquire) {
1534  thread().measure_and_accumulate(module.total);
1535  } else {
1536  thread().measure_and_store(module.total);
1537  }
1538  ++module.events;
1539 }
1540 
1542  unsupportedSignal(__func__);
1543 }
1544 
1546  unsupportedSignal(__func__);
1547 }
1548 
1550  ignoredSignal(__func__);
1551 }
1552 
1554  ignoredSignal(__func__);
1555 }
1556 
1558  ignoredSignal(__func__);
1559 }
1560 
1562  ignoredSignal(__func__);
1563 }
1564 
1566  thread().measure_and_accumulate(overhead_);
1567 }
1568 
1570  auto index = gc.runIndex();
1571  thread().measure_and_accumulate(run_transition_[index]);
1572 }
1573 
1575  thread().measure_and_accumulate(overhead_);
1576 }
1577 
1579  auto index = gc.runIndex();
1580  thread().measure_and_accumulate(run_transition_[index]);
1581 }
1582 
1584  thread().measure_and_accumulate(overhead_);
1585 }
1586 
1588  auto index = gc.luminosityBlockIndex();
1589  thread().measure_and_accumulate(lumi_transition_[index]);
1590 }
1591 
1593  thread().measure_and_accumulate(overhead_);
1594 }
1595 
1597  auto index = gc.luminosityBlockIndex();
1598  thread().measure_and_accumulate(lumi_transition_[index]);
1599 }
1600 
1602  thread().measure_and_accumulate(overhead_);
1603 }
1604 
1606  auto index = sc.runIndex();
1607  thread().measure_and_accumulate(run_transition_[index]);
1608 }
1609 
1611  thread().measure_and_accumulate(overhead_);
1612 }
1613 
1615  auto index = sc.runIndex();
1616  thread().measure_and_accumulate(run_transition_[index]);
1617 }
1618 
1620  thread().measure_and_accumulate(overhead_);
1621 }
1622 
1624  auto index = sc.luminosityBlockIndex();
1625  thread().measure_and_accumulate(lumi_transition_[index]);
1626 }
1627 
1629  thread().measure_and_accumulate(overhead_);
1630 }
1631 
1633  auto index = sc.luminosityBlockIndex();
1634  thread().measure_and_accumulate(lumi_transition_[index]);
1635 }
1636 
1638  // initialise the measurement point for a thread that has newly joining the TBB pool
1639  thread().measure();
1640 }
1641 
1643  // account any resources used or freed by the thread before leaving the TBB pool
1644  thread().measure_and_accumulate(overhead_);
1645 }
1646 
1648 
1649 // describe the module's configuration
1652  desc.addUntracked<bool>("printEventSummary", false);
1653  desc.addUntracked<bool>("printRunSummary", true);
1654  desc.addUntracked<bool>("printJobSummary", true);
1655  // JSON configuration
1656  //desc.addUntracked<bool>("writeJSONByEvent", false);
1657  //desc.addUntracked<bool>("writeJSONByLumiSection", false);
1658  //desc.addUntracked<bool>("writeJSONByRun", false);
1659  desc.addUntracked<bool>("writeJSONSummary", false);
1660  desc.addUntracked<std::string>("jsonFileName", "resources.json");
1661  // DQM configuration
1662  desc.addUntracked<bool>("enableDQM", true);
1663  desc.addUntracked<bool>("enableDQMbyModule", false);
1664  desc.addUntracked<bool>("enableDQMbyPath", false);
1665  desc.addUntracked<bool>("enableDQMbyLumiSection", false);
1666  desc.addUntracked<bool>("enableDQMbyProcesses", false);
1667  desc.addUntracked<bool>("enableDQMTransitions", false);
1668  desc.addUntracked<double>("dqmTimeRange", 1000.); // ms
1669  desc.addUntracked<double>("dqmTimeResolution", 5.); // ms
1670  desc.addUntracked<double>("dqmMemoryRange", 1000000.); // kB
1671  desc.addUntracked<double>("dqmMemoryResolution", 5000.); // kB
1672  desc.addUntracked<double>("dqmPathTimeRange", 100.); // ms
1673  desc.addUntracked<double>("dqmPathTimeResolution", 0.5); // ms
1674  desc.addUntracked<double>("dqmPathMemoryRange", 1000000.); // kB
1675  desc.addUntracked<double>("dqmPathMemoryResolution", 5000.); // kB
1676  desc.addUntracked<double>("dqmModuleTimeRange", 40.); // ms
1677  desc.addUntracked<double>("dqmModuleTimeResolution", 0.2); // ms
1678  desc.addUntracked<double>("dqmModuleMemoryRange", 100000.); // kB
1679  desc.addUntracked<double>("dqmModuleMemoryResolution", 500.); // kB
1680  desc.addUntracked<unsigned>("dqmLumiSectionsRange", 2500); // ~ 16 hours
1681  desc.addUntracked<std::string>("dqmPath", "HLT/TimerService");
1682 
1683  edm::ParameterSetDescription highlightModulesDescription;
1684  highlightModulesDescription.addUntracked<std::vector<std::string>>("modules", {});
1685  highlightModulesDescription.addUntracked<std::string>("label", "producers");
1686  desc.addVPSetUntracked("highlightModules", highlightModulesDescription, {});
1687 
1688  // # OBSOLETE - these parameters are ignored, they are left only not to break old configurations
1689  // they will not be printed in the generated cfi.py file
1690  desc.addOptionalNode(edm::ParameterDescription<bool>("useRealTimeClock", true, false), false)
1691  ->setComment("This parameter is obsolete and will be ignored.");
1692  desc.addOptionalNode(edm::ParameterDescription<bool>("enableTimingPaths", true, false), false)
1693  ->setComment("This parameter is obsolete and will be ignored.");
1694  desc.addOptionalNode(edm::ParameterDescription<bool>("enableTimingModules", true, false), false)
1695  ->setComment("This parameter is obsolete and will be ignored.");
1696  desc.addOptionalNode(edm::ParameterDescription<bool>("enableTimingExclusive", false, false), false)
1697  ->setComment("This parameter is obsolete and will be ignored.");
1698  desc.addOptionalNode(edm::ParameterDescription<bool>("enableTimingSummary", false, false), false)
1699  ->setComment("This parameter is obsolete and will be ignored.");
1700  desc.addOptionalNode(edm::ParameterDescription<bool>("skipFirstPath", false, false), false)
1701  ->setComment("This parameter is obsolete and will be ignored.");
1702  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathActive", false, false), false)
1703  ->setComment("This parameter is obsolete and will be ignored.");
1704  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathTotal", true, false), false)
1705  ->setComment("This parameter is obsolete and will be ignored.");
1706  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathOverhead", false, false), false)
1707  ->setComment("This parameter is obsolete and will be ignored.");
1708  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathDetails", false, false), false)
1709  ->setComment("This parameter is obsolete and will be ignored.");
1710  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathCounters", true, false), false)
1711  ->setComment("This parameter is obsolete and will be ignored.");
1712  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathExclusive", false, false), false)
1713  ->setComment("This parameter is obsolete and will be ignored.");
1714  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyModuleType", false, false), false)
1715  ->setComment("This parameter is obsolete and will be ignored.");
1716  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMSummary", false, false), false)
1717  ->setComment("This parameter is obsolete and will be ignored.");
1718 
1719  descriptions.add("FastTimerService", desc);
1720 }
1721 
1722 // declare FastTimerService as a framework Service
1724 DEFINE_FWK_SERVICE(FastTimerService);
ConfigurationDescriptions.h
edm::GlobalContext::luminosityBlockID
LuminosityBlockID const & luminosityBlockID() const
Definition: GlobalContext.h:55
FastTimerService::enable_dqm_bynproc_
const bool enable_dqm_bynproc_
Definition: FastTimerService.h:493
SummaryClient_cfi.labels
labels
Definition: SummaryClient_cfi.py:61
FastTimerService::preSourceEvent
void preSourceEvent(edm::StreamID)
Definition: FastTimerService.cc:1445
edm::StreamID
Definition: StreamID.h:30
FastTimerService::json_filename_
const std::string json_filename_
Definition: FastTimerService.h:486
eostools.ls
def ls(path, rec=False)
Definition: eostools.py:349
edm::ModuleDescription::moduleLabel
std::string const & moduleLabel() const
Definition: ModuleDescription.h:43
diffTwoXMLs.ranges
string ranges
Definition: diffTwoXMLs.py:79
FastTimerService::concurrent_threads_
unsigned int concurrent_threads_
Definition: FastTimerService.h:474
LumiScalers.h
FastTimerService::ResourcesPerProcess
Definition: FastTimerService.h:284
FastTimerService::postStreamBeginLumi
void postStreamBeginLumi(edm::StreamContext const &)
Definition: FastTimerService.cc:1057
ProcessCallGraph::processes
const std::vector< ProcessType > & processes() const
Definition: ProcessCallGraph.cc:282
FastTimerService::postSourceEvent
void postSourceEvent(edm::StreamID)
Definition: FastTimerService.cc:1459
FastTimerService::preBeginJob
void preBeginJob(edm::PathsAndConsumesOfModulesBase const &, edm::ProcessContext const &)
Definition: FastTimerService.cc:970
FastTimerService::ResourcesPerJob::operator+=
ResourcesPerJob & operator+=(ResourcesPerJob const &other)
Definition: FastTimerService.cc:277
FastTimerService::ResourcesPerModule::operator+
ResourcesPerModule operator+(ResourcesPerModule const &other) const
Definition: FastTimerService.cc:192
FastTimerService::printEvent
void printEvent(T &out, ResourcesPerJob const &) const
FastTimerService::preModuleStreamBeginLumi
void preModuleStreamBeginLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1619
electrons_cff.bool
bool
Definition: electrons_cff.py:372
FastTimerService::callgraph_
ProcessCallGraph callgraph_
Definition: FastTimerService.h:440
FastTimerService::ResourcesPerModule::reset
void reset() noexcept
Definition: FastTimerService.cc:179
mps_fire.i
i
Definition: mps_fire.py:355
LogMessageMonitor_cff.modules
modules
Definition: LogMessageMonitor_cff.py:7
MessageLogger.h
FastTimerService::preModuleGlobalBeginRun
void preModuleGlobalBeginRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1565
funct::false
false
Definition: Factorize.h:34
FastTimerService::concurrent_streams_
unsigned int concurrent_streams_
Definition: FastTimerService.h:473
edm::ProcessContext::isSubProcess
bool isSubProcess() const
Definition: ProcessContext.h:34
FastTimerService::preSourceLumi
void preSourceLumi(edm::LuminosityBlockIndex)
Definition: FastTimerService.cc:1090
FastTimerService::ResourcesPerJob::ResourcesPerJob
ResourcesPerJob()=default
FastTimerService::Measurement::measure
void measure() noexcept
Definition: FastTimerService.cc:306
FastTimerService::PlotsPerProcess::PlotsPerProcess
PlotsPerProcess(ProcessCallGraph::ProcessType const &)
Definition: FastTimerService.cc:633
memory_usage.h
cond::time::nanoseconds
boost::date_time::subsecond_duration< boost::posix_time::time_duration, 1000000000 > nanoseconds
Definition: TimeConversions.h:16
FastTimerService::ResourcesPerModule
Definition: FastTimerService.h:257
FastTimerService::AtomicResources
Definition: FastTimerService.h:236
mps_update.status
status
Definition: mps_update.py:69
TriggerNamesService.h
FastTimerService::postEvent
void postEvent(edm::StreamContext const &)
Definition: FastTimerService.cc:1397
FastTimerService::ResourcesPerJob::reset
void reset()
Definition: FastTimerService.cc:264
modules
Definition: ZHLTMatchFilter.cc:17
FastTimerService::postModuleEvent
void postModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1526
module::module
module()
Definition: vlib.cc:913
LuminosityBlock.h
edm::ParameterSetDescription::addVPSetUntracked
ParameterDescriptionBase * addVPSetUntracked(U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults)
Definition: ParameterSetDescription.h:156
SiStripPI::printSummary
void printSummary(const std::map< unsigned int, SiStripDetSummary::Values > &map)
Definition: SiStripPayloadInspectorHelper.h:438
edm::GlobalContext::processContext
ProcessContext const * processContext() const
Definition: GlobalContext.h:59
FastTimerService::print_job_summary_
const bool print_job_summary_
Definition: FastTimerService.h:479
edm::ProcessContext
Definition: ProcessContext.h:27
FastTimerService::preSourceConstruction
void preSourceConstruction(edm::ModuleDescription const &)
Definition: FastTimerService.cc:966
FastTimerService::PlotsPerJob::fill_run
void fill_run(AtomicResources const &)
Definition: FastTimerService.cc:749
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
edmLumisInFiles.description
description
Definition: edmLumisInFiles.py:11
FastTimerService::preGlobalBeginLumi
void preGlobalBeginLumi(edm::GlobalContext const &)
Definition: FastTimerService.cc:1020
cms::cuda::stream
cudaStream_t stream
Definition: HistoContainer.h:57
FastTimerService::FastTimerService
FastTimerService(const edm::ParameterSet &, edm::ActivityRegistry &)
Definition: FastTimerService.cc:761
FastTimerService::postEndJob
void postEndJob()
Definition: FastTimerService.cc:1096
FastTimerService::overhead_
AtomicResources overhead_
Definition: FastTimerService.h:451
FastTimerService::ResourcesPerPath::reset
void reset()
Definition: FastTimerService.cc:201
FastTimerService::concurrent_runs_
unsigned int concurrent_runs_
Definition: FastTimerService.h:472
FastTimerService::enable_dqm_bypath_
const bool enable_dqm_bypath_
Definition: FastTimerService.h:491
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
FastTimerService::on_scheduler_exit
void on_scheduler_exit(bool worker) final
Definition: FastTimerService.cc:1642
DEFINE_FWK_SERVICE
#define DEFINE_FWK_SERVICE(type)
Definition: ServiceMaker.h:105
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
FastTimerService::postModuleStreamEndRun
void postModuleStreamEndRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1614
FastTimerService::enable_dqm_transitions_
const bool enable_dqm_transitions_
Definition: FastTimerService.h:494
FastTimerService::writeSummaryJSON
void writeSummaryJSON(ResourcesPerJob const &data, std::string const &filename) const
Definition: FastTimerService.cc:1351
cms::cuda::assert
assert(be >=bs)
FastTimerService::concurrent_lumis_
unsigned int concurrent_lumis_
Definition: FastTimerService.h:471
DQMStore.h
FastTimerService::dqm_event_ranges_
const PlotRanges dqm_event_ranges_
Definition: FastTimerService.h:496
FastTimerService::preGlobalBeginRun
void preGlobalBeginRun(edm::GlobalContext const &)
Definition: FastTimerService.cc:890
FastTimerService::isLastSubprocess
bool isLastSubprocess(std::atomic< unsigned int > &check)
Definition: FastTimerService.cc:1388
mps_check.array
array
Definition: mps_check.py:216
ProcessCallGraph::processDescription
const ProcessType & processDescription(unsigned int) const
Definition: ProcessCallGraph.cc:285
edm::StreamID::value
unsigned int value() const
Definition: StreamID.h:42
FastTimerService::postSourceLumi
void postSourceLumi(edm::LuminosityBlockIndex)
Definition: FastTimerService.cc:1092
FastTimerService::preModuleEvent
void preModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1520
FastTimerService::unsupportedSignal
void unsupportedSignal(const std::string &signal) const
Definition: FastTimerService.cc:882
edm::ModuleCallingContext::moduleDescription
ModuleDescription const * moduleDescription() const
Definition: ModuleCallingContext.h:50
FastTimerService::preModuleEventAcquire
void preModuleEventAcquire(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1503
FastTimerService::encodeToJSON
json encodeToJSON(std::string const &type, std::string const &label, unsigned int events, T const &data) const
infinity
const double infinity
Definition: CSCChamberFitter.cc:10
patZpeak.events
events
Definition: patZpeak.py:20
edm::EventID::luminosityBlock
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:39
boost
Definition: CLHEP.h:16
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
edm::service::SystemBounds::maxNumberOfConcurrentLuminosityBlocks
unsigned int maxNumberOfConcurrentLuminosityBlocks() const
Definition: SystemBounds.h:37
FastTimerService::enable_dqm_
bool enable_dqm_
Definition: FastTimerService.h:489
FastTimerService::printTransition
void printTransition(T &out, AtomicResources const &data, std::string const &label) const
FastTimerService::ResourcesPerModule::ResourcesPerModule
ResourcesPerModule() noexcept
Definition: FastTimerService.cc:177
FastTimerService::PlotsPerProcess::book
void book(dqm::reco::DQMStore::IBooker &, ProcessCallGraph const &, ProcessCallGraph::ProcessType const &, PlotRanges const &event_ranges, PlotRanges const &path_ranges, unsigned int lumisections, bool bypath, bool byls)
Definition: FastTimerService.cc:636
FastTimerService::PlotRanges
Definition: FastTimerService.h:317
FastTimerService::preallocate
void preallocate(edm::service::SystemBounds const &)
Definition: FastTimerService.cc:932
FastTimerService::preGlobalEndRun
void preGlobalEndRun(edm::GlobalContext const &)
Definition: FastTimerService.cc:1063
FastTimerService::PlotsPerPath::fill
void fill(ProcessCallGraph::PathType const &, ResourcesPerJob const &, ResourcesPerPath const &, unsigned int lumisection)
Definition: FastTimerService.cc:604
HLTPathStatus.h
edm::ModuleDescription
Definition: ModuleDescription.h:21
FastTimerService::on_scheduler_entry
void on_scheduler_entry(bool worker) final
Definition: FastTimerService.cc:1637
FastTimerService::printSummaryHeader
void printSummaryHeader(T &out, std::string const &label, bool detailed) const
FastTimerService::print_run_summary_
const bool print_run_summary_
Definition: FastTimerService.h:478
FastTimerService::postGlobalBeginLumi
void postGlobalBeginLumi(edm::GlobalContext const &)
Definition: FastTimerService.cc:1031
edm::ParameterSetDescription::addOptionalNode
ParameterDescriptionNode * addOptionalNode(ParameterDescriptionNode const &node, bool writeToCfi)
Definition: ParameterSetDescription.cc:50
ModuleDescription.h
FastTimerService::postModuleGlobalBeginRun
void postModuleGlobalBeginRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1569
FastTimerService::ignoredSignal
void ignoredSignal(const std::string &signal) const
Definition: FastTimerService.cc:877
config
Definition: config.py:1
fileCollector.now
now
Definition: fileCollector.py:207
FastTimerService::ResourcesPerModule::operator+=
ResourcesPerModule & operator+=(ResourcesPerModule const &other)
Definition: FastTimerService.cc:185
FastTimerService::postGlobalEndRun
void postGlobalEndRun(edm::GlobalContext const &)
Definition: FastTimerService.cc:1065
FastTimerService::ResourcesPerProcess::operator+=
ResourcesPerProcess & operator+=(ResourcesPerProcess const &other)
Definition: FastTimerService.cc:235
ProcessCallGraph::ProcessType
Definition: ProcessCallGraph.h:78
alignCSCRings.s
s
Definition: alignCSCRings.py:92
edm::PathContext::pathID
unsigned int pathID() const
Definition: PathContext.h:32
FastTimerService::AtomicResources::reset
void reset()
Definition: FastTimerService.cc:134
FastTimerService::postModuleGlobalEndLumi
void postModuleGlobalEndLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1596
RPCNoise_example.check
check
Definition: RPCNoise_example.py:71
dqmdumpme.last
last
Definition: dqmdumpme.py:56
FastTimerService::postModuleStreamEndLumi
void postModuleStreamEndLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1632
part
part
Definition: HCALResponse.h:20
FastTimerService::preModuleEventPrefetching
void preModuleEventPrefetching(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1549
FastTimerService::Resources
Definition: FastTimerService.h:217
edm::LuminosityBlockIndex
Definition: LuminosityBlockIndex.h:33
FastTimerService::preStreamBeginLumi
void preStreamBeginLumi(edm::StreamContext const &)
Definition: FastTimerService.cc:1055
edm::GlobalContext::luminosityBlockIndex
LuminosityBlockIndex const & luminosityBlockIndex() const
Definition: GlobalContext.h:57
reco::ceil
constexpr int32_t ceil(float num)
Definition: constexpr_cmath.h:7
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
edm::StreamContext
Definition: StreamContext.h:31
FastTimerService::postModuleGlobalEndRun
void postModuleGlobalEndRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1578
FastTimerService::enable_dqm_byls_
const bool enable_dqm_byls_
Definition: FastTimerService.h:492
edm::service::SystemBounds::maxNumberOfConcurrentRuns
unsigned int maxNumberOfConcurrentRuns() const
Definition: SystemBounds.h:36
FastTimerService::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: FastTimerService.cc:1650
FastTimerService::preModuleGlobalBeginLumi
void preModuleGlobalBeginLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1583
dqm-mbProfile.format
format
Definition: dqm-mbProfile.py:16
FastTimerService::preStreamBeginRun
void preStreamBeginRun(edm::StreamContext const &)
Definition: FastTimerService.cc:930
FastTimerService::postModuleStreamBeginRun
void postModuleStreamBeginRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1605
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
FastTimerService::ResourcesPerProcess::reset
void reset()
Definition: FastTimerService.cc:227
EventID.h
FastTimerService::isFirstSubprocess
bool isFirstSubprocess(edm::StreamContext const &)
edm::ActivityRegistry
Definition: ActivityRegistry.h:132
source
static const std::string source
Definition: EdmProvDump.cc:47
str
#define str(s)
Definition: TestProcessor.cc:48
dqm::implementation::IBooker::bookProfile
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:322
FastTimerService::preModuleStreamEndRun
void preModuleStreamEndRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1610
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
svgfig.load
def load(fileName)
Definition: svgfig.py:547
FastTimerService::PlotsPerElement::fill_fraction
void fill_fraction(Resources const &, Resources const &, unsigned int lumisection)
Definition: FastTimerService.cc:515
FastTimerService::ResourcesPerPath
Definition: FastTimerService.h:271
trackingPlots.other
other
Definition: trackingPlots.py:1465
processor_model.h
FastTimerService::printSummaryLine
void printSummaryLine(T &out, Resources const &data, uint64_t events, std::string const &label) const
dqm::impl::MonitorElement::setXTitle
virtual void setXTitle(std::string const &title)
Definition: MonitorElement.cc:861
ParameterSetDescription.h
FastTimerService::PlotsPerProcess::fill
void fill(ProcessCallGraph::ProcessType const &, ResourcesPerJob const &, ResourcesPerProcess const &, unsigned int ls)
Definition: FastTimerService.cc:658
makeHippyCampaign.basedir
basedir
Definition: makeHippyCampaign.py:14
FastTimerService::AtomicResources::operator+
AtomicResources operator+(AtomicResources const &other) const
Definition: FastTimerService.cc:165
FastTimerService::printEventHeader
void printEventHeader(T &out, std::string const &label) const
dqm::implementation::NavigatorBase::pwd
virtual std::string pwd()
Definition: DQMStore.cc:16
FastTimerService::Resources::operator+
Resources operator+(Resources const &other) const
Definition: FastTimerService.cc:108
FastTimerService::ResourcesPerJob::processes
std::vector< ResourcesPerProcess > processes
Definition: FastTimerService.h:312
ServiceMaker.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::PathContext::isEndPath
bool isEndPath() const
Definition: PathContext.h:35
dqm::implementation::IBooker::book1DD
MonitorElement * book1DD(TString const &name, TString const &title, int nchX, double lowX, double highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:155
edm::LogWarning
Definition: MessageLogger.h:141
FastTimerService::Measurement::Measurement
Measurement() noexcept
Definition: FastTimerService.cc:304
FastTimerService::preModuleStreamEndLumi
void preModuleStreamEndLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1628
FastTimerService::ResourcesPerPath::operator+
ResourcesPerPath operator+(ResourcesPerPath const &other) const
Definition: FastTimerService.cc:216
FastTimerService::PlotsPerJob::processes_
std::vector< PlotsPerProcess > processes_
Definition: FastTimerService.h:436
edm::ParameterSetDescription::addUntracked
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:100
ProcessCallGraph
Definition: ProcessCallGraph.h:27
FastTimerService::postModuleEventAcquire
void postModuleEventAcquire(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1509
edm::GlobalContext
Definition: GlobalContext.h:29
edm::service::SystemBounds
Definition: SystemBounds.h:29
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
edm::ParameterSet
Definition: ParameterSet.h:36
edm::service::SystemBounds::maxNumberOfThreads
unsigned int maxNumberOfThreads() const
Definition: SystemBounds.h:38
memory_usage::deallocated
static uint64_t deallocated()
Definition: memory_usage.cc:88
ValidateTausOnZEEFastSim_cff.proc
proc
Definition: ValidateTausOnZEEFastSim_cff.py:6
FastTimerService::write_json_summary_
const bool write_json_summary_
Definition: FastTimerService.h:485
Timestamp.h
Event.h
edm::StreamContext::luminosityBlockIndex
LuminosityBlockIndex const & luminosityBlockIndex() const
Definition: StreamContext.h:61
FastTimerService::preModuleGlobalEndRun
void preModuleGlobalEndRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1574
edm::StreamContext::streamID
StreamID const & streamID() const
Definition: StreamContext.h:54
edm::PathContext
Definition: PathContext.h:24
KineDebug3::count
void count()
Definition: KinematicConstrainedVertexUpdatorT.h:21
FastTimerService::postModuleEventPrefetching
void postModuleEventPrefetching(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1553
LaserDQM_cfg.process
process
Definition: LaserDQM_cfg.py:3
FastTimerService::PlotsPerElement::book
void book(dqm::reco::DQMStore::IBooker &, std::string const &name, std::string const &title, PlotRanges const &ranges, unsigned int lumisections, bool byls)
Definition: FastTimerService.cc:372
edm::StreamContext::processContext
ProcessContext const * processContext() const
Definition: StreamContext.h:63
FastTimerService.h
edm::HLTPathStatus
Definition: HLTPathStatus.h:33
FastTimerService::postModuleStreamBeginLumi
void postModuleStreamBeginLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1623
FastTimerService::Measurement::measure_and_store
void measure_and_store(Resources &store) noexcept
Definition: FastTimerService.cc:316
event_
void event_()
edm::Service
Definition: Service.h:30
createfilelist.int
int
Definition: createfilelist.py:10
FastTimerService::ResourcesPerJob::operator+
ResourcesPerJob operator+(ResourcesPerJob const &other) const
Definition: FastTimerService.cc:294
dqm::impl::MonitorElement::setYTitle
virtual void setYTitle(std::string const &title)
Definition: MonitorElement.cc:866
edm::LuminosityBlockID::luminosityBlock
LuminosityBlockNumber_t luminosityBlock() const
Definition: LuminosityBlockID.h:42
FastTimerService::Measurement::measure_and_accumulate
void measure_and_accumulate(Resources &store) noexcept
Definition: FastTimerService.cc:334
FastTimerService::preStreamEndRun
void preStreamEndRun(edm::StreamContext const &)
Definition: FastTimerService.cc:1016
edm::LogVerbatim
Definition: MessageLogger.h:297
edm::service::SystemBounds::maxNumberOfStreams
unsigned int maxNumberOfStreams() const
Definition: SystemBounds.h:35
memory_usage::allocated
static uint64_t allocated()
Definition: memory_usage.cc:86
FastTimerService::preModuleGlobalEndLumi
void preModuleGlobalEndLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1592
FastTimerService::PlotsPerJob::PlotsPerJob
PlotsPerJob(ProcessCallGraph const &job, std::vector< GroupOfModules > const &groups)
Definition: FastTimerService.cc:674
FastTimerService::PlotsPerJob::fill
void fill(ProcessCallGraph const &, ResourcesPerJob const &, unsigned int ls)
Definition: FastTimerService.cc:731
FastTimerService::postModuleGlobalBeginLumi
void postModuleGlobalBeginLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1587
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
FastTimerService::Resources::Resources
Resources()
Definition: FastTimerService.cc:79
module
Definition: vlib.h:198
FastTimerService::PlotsPerPath::book
void book(dqm::reco::DQMStore::IBooker &, std::string const &, ProcessCallGraph const &, ProcessCallGraph::PathType const &, PlotRanges const &ranges, unsigned int lumisections, bool byls)
Definition: FastTimerService.cc:557
FastTimerService::postStreamEndLumi
void postStreamEndLumi(edm::StreamContext const &)
Definition: FastTimerService.cc:1061
FastTimerService::printPathSummaryLine
void printPathSummaryLine(T &out, Resources const &data, Resources const &total, uint64_t events, std::string const &label) const
FastTimerService::ResourcesPerProcess::ResourcesPerProcess
ResourcesPerProcess(ProcessCallGraph::ProcessType const &process)
Definition: FastTimerService.cc:224
FastTimerService::AtomicResources::AtomicResources
AtomicResources()
Definition: FastTimerService.cc:125
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
overlapproblemtsosanalyzer_cfi.title
title
Definition: overlapproblemtsosanalyzer_cfi.py:7
edm::StreamContext::runIndex
RunIndex const & runIndex() const
Definition: StreamContext.h:60
FastTimerService::preEventReadFromSource
void preEventReadFromSource(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1557
ProcessCallGraph::source
const edm::ModuleDescription & source() const
Definition: ProcessCallGraph.cc:149
FastTimerService::Resources::operator+=
Resources & operator+=(Resources const &other)
Definition: FastTimerService.cc:92
FastTimerService::preModuleStreamBeginRun
void preModuleStreamBeginRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1601
FastTimerService::thread
Measurement & thread()
Definition: FastTimerService.cc:1647
type
type
Definition: HCALResponse.h:21
FastTimerService::Measurement
Definition: FastTimerService.h:188
std
Definition: JetResolutionObject.h:76
FastTimerService::ResourcesPerJob
Definition: FastTimerService.h:297
FastTimerService::PlotsPerJob::fill_lumi
void fill_lumi(AtomicResources const &, unsigned int lumisection)
Definition: FastTimerService.cc:754
FastTimerService::AtomicResources::operator=
AtomicResources & operator=(AtomicResources const &other)
Definition: FastTimerService.cc:141
FastTimerService::prePathEvent
void prePathEvent(edm::StreamContext const &, edm::PathContext const &)
Definition: FastTimerService.cc:1469
FastTimerService::postPathEvent
void postPathEvent(edm::StreamContext const &, edm::PathContext const &, edm::HLTPathStatus const &)
Definition: FastTimerService.cc:1479
edm::PathsAndConsumesOfModulesBase
Definition: PathsAndConsumesOfModulesBase.h:34
FastTimerService::postGlobalEndLumi
void postGlobalEndLumi(edm::GlobalContext const &)
Definition: FastTimerService.cc:1035
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
T
long double T
Definition: Basic3DVectorLD.h:48
dqm::implementation::IGetter
Definition: DQMStore.h:484
FastTimerService::AtomicResources::operator+=
AtomicResources & operator+=(AtomicResources const &other)
Definition: FastTimerService.cc:149
FastTimerService::PlotsPerJob::book
void book(dqm::reco::DQMStore::IBooker &, ProcessCallGraph const &, std::vector< GroupOfModules > const &, PlotRanges const &event_ranges, PlotRanges const &path_ranges, PlotRanges const &module_ranges, unsigned int lumisections, bool bymodule, bool bypath, bool byls, bool transitions)
Definition: FastTimerService.cc:681
FastTimerService::preModuleEventDelayedGet
void preModuleEventDelayedGet(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1541
ProcessCallGraph::PathType
Definition: ProcessCallGraph.h:50
FastTimerService::preStreamEndLumi
void preStreamEndLumi(edm::StreamContext const &)
Definition: FastTimerService.cc:1059
FastTimerService::preGlobalEndLumi
void preGlobalEndLumi(edm::GlobalContext const &)
Definition: FastTimerService.cc:1033
dqm::implementation::IBooker::UseRunScope
UseScope< MonitorElementData::Scope::RUN > UseRunScope
Definition: DQMStore.h:464
dqmiodatasetharvest.processes
processes
Definition: dqmiodatasetharvest.py:190
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
FastTimerService::postStreamBeginRun
void postStreamBeginRun(edm::StreamContext const &)
Definition: FastTimerService.cc:1014
FastTimerService::postModuleEventDelayedGet
void postModuleEventDelayedGet(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1545
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
Skims_PA_cff.paths
paths
Definition: Skims_PA_cff.py:18
FastTimerService::Resources::reset
void reset()
Definition: FastTimerService.cc:85
edm::RunIndex
Definition: RunIndex.h:32
edm::LuminosityBlockID::run
RunNumber_t run() const
Definition: LuminosityBlockID.h:41
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
dqm::implementation::IBooker
Definition: DQMStore.h:43
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
edm::GlobalContext::runIndex
RunIndex const & runIndex() const
Definition: GlobalContext.h:56
dqmMemoryStats.total
total
Definition: dqmMemoryStats.py:152
FastTimerService::printHeader
void printHeader(T &out, std::string const &label) const
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
FastTimerService::PlotsPerElement::fill
void fill(Resources const &, unsigned int lumisection)
Definition: FastTimerService.cc:457
FastTimerService::ResourcesPerProcess::operator+
ResourcesPerProcess operator+(ResourcesPerProcess const &other) const
Definition: FastTimerService.cc:247
FastTimerService::printSummary
void printSummary(T &out, ResourcesPerJob const &data, std::string const &label) const
mps_fire.result
result
Definition: mps_fire.py:303
memory_usage::is_available
static bool is_available()
Definition: memory_usage.cc:84
FastTimerService::postGlobalBeginRun
void postGlobalBeginRun(edm::GlobalContext const &)
Definition: FastTimerService.cc:928
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
trigObjTnPSource_cfi.bins
bins
Definition: trigObjTnPSource_cfi.py:20
FastTimerService::postSourceRun
void postSourceRun(edm::RunIndex)
Definition: FastTimerService.cc:1088
ParameterSet.h
processor_model
const std::string processor_model
Definition: processor_model.cc:47
edm::ParameterDescriptionNode::setComment
void setComment(std::string const &value)
Definition: ParameterDescriptionNode.cc:106
customisers.module_name
module_name
Definition: customisers.py:41
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
ProcessCallGraph::module
const edm::ModuleDescription & module(unsigned int module) const
Definition: ProcessCallGraph.cc:152
event
Definition: event.py:1
FastTimerService::printEventLine
void printEventLine(T &out, Resources const &data, std::string const &label) const
StreamID.h
edm::ParameterDescription
Definition: ParameterDescription.h:110
json
nlohmann::json json
Definition: FastTimerService.cc:19
HLT_2018_cff.fraction
fraction
Definition: HLT_2018_cff.py:51317
label
const char * label
Definition: PFTauDecayModeTools.cc:11
FastTimerService::preSourceRun
void preSourceRun(edm::RunIndex)
Definition: FastTimerService.cc:1086
FastTimerService::print_event_summary_
const bool print_event_summary_
Definition: FastTimerService.h:477
FastTimerService::enable_dqm_bymodule_
const bool enable_dqm_bymodule_
Definition: FastTimerService.h:490
FastTimerService::postStreamEndRun
void postStreamEndRun(edm::StreamContext const &)
Definition: FastTimerService.cc:1018
FastTimerService::preEvent
void preEvent(edm::StreamContext const &)
Definition: FastTimerService.cc:1395
FastTimerService::postEventReadFromSource
void postEventReadFromSource(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1561
edm::StreamContext::eventID
EventID const & eventID() const
Definition: StreamContext.h:59
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
FastTimerService::printPathSummaryHeader
void printPathSummaryHeader(T &out, std::string const &label) const
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
edm::ModuleDescription::id
unsigned int id() const
Definition: ModuleDescription.h:46
watchdog.group
group
Definition: watchdog.py:82
FastTimerService::postBeginJob
void postBeginJob()
Definition: FastTimerService.cc:975
edm::ModuleCallingContext
Definition: ModuleCallingContext.h:29
FastTimerService::ResourcesPerPath::operator+=
ResourcesPerPath & operator+=(ResourcesPerPath const &other)
Definition: FastTimerService.cc:208