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