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