CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
StallMonitor.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: FWCore/Services
4 // Class : StallMonitor
5 //
6 // Implementation:
7 //
8 // Original Author: Kyle Knoepfel
9 //
10 
28 #include "tbb/concurrent_unordered_map.h"
29 
30 #include <atomic>
31 #include <chrono>
32 #include <iomanip>
33 #include <iostream>
34 #include <sstream>
35 
36 namespace {
37 
38  using duration_t = std::chrono::microseconds;
39  using clock_t = std::chrono::steady_clock;
40  auto now = clock_t::now;
41 
42  inline auto stream_id(edm::StreamContext const& cs) { return cs.streamID().value(); }
43 
44  inline auto module_id(edm::ModuleCallingContext const& mcc) { return mcc.moduleDescription()->id(); }
45 
46  //===============================================================
47  class StallStatistics {
48  public:
49  // c'tor receiving 'std::string const&' type not provided since we
50  // must be able to call (e.g.) std::vector<StallStatistics>(20),
51  // for which a default label is not sensible in this context.
52  StallStatistics() = default;
53 
54  std::string const& label() const { return label_; }
55  unsigned numberOfStalls() const { return stallCounter_; }
56 
57  using rep_t = duration_t::rep;
58 
59  duration_t totalStalledTime() const { return duration_t{totalTime_.load()}; }
60  duration_t maxStalledTime() const { return duration_t{maxTime_.load()}; }
61 
62  // Modifiers
63  void setLabel(std::string const& label) { label_ = label; }
64 
65  void update(duration_t const ms) {
66  ++stallCounter_;
67  auto const thisTime = ms.count();
68  totalTime_ += thisTime;
69  rep_t max{maxTime_};
70  while (thisTime > max && !maxTime_.compare_exchange_strong(max, thisTime))
71  ;
72  }
73 
74  private:
75  std::string label_{};
76  std::atomic<unsigned> stallCounter_{};
77  std::atomic<rep_t> totalTime_{};
78  std::atomic<rep_t> maxTime_{};
79  };
80 
81  //===============================================================
82  // Message-assembly utilities
83  template <typename T>
84  std::enable_if_t<std::is_integral<T>::value> concatenate(std::ostream& os, T const t) {
85  os << ' ' << t;
86  }
87 
88  template <typename H, typename... T>
89  std::enable_if_t<std::is_integral<H>::value> concatenate(std::ostream& os, H const h, T const... t) {
90  os << ' ' << h;
91  concatenate(os, t...);
92  }
93 
94  enum class step : char {
95  preSourceEvent = 'S',
96  postSourceEvent = 's',
97  preEvent = 'E',
98  postModuleEventPrefetching = 'p',
99  preModuleEventAcquire = 'A',
100  postModuleEventAcquire = 'a',
101  preModuleEvent = 'M',
102  preEventReadFromSource = 'R',
103  postEventReadFromSource = 'r',
104  postModuleEvent = 'm',
105  postEvent = 'e'
106  };
107 
108  enum class Phase : short {
109  globalEndRun = -4,
110  streamEndRun = -3,
111  globalEndLumi = -2,
112  streamEndLumi = -1,
113  Event = 0,
114  streamBeginLumi = 1,
115  globalBeginLumi = 2,
116  streamBeginRun = 3,
117  globalBeginRun = 4
118  };
119 
120  std::ostream& operator<<(std::ostream& os, step const s) {
121  os << static_cast<std::underlying_type_t<step>>(s);
122  return os;
123  }
124 
125  std::ostream& operator<<(std::ostream& os, Phase const s) {
126  os << static_cast<std::underlying_type_t<Phase>>(s);
127  return os;
128  }
129 
130  template <step S, typename... ARGS>
131  std::string assembleMessage(ARGS const... args) {
132  std::ostringstream oss;
133  oss << S;
134  concatenate(oss, args...);
135  oss << '\n';
136  return oss.str();
137  }
138 
139  Phase toTransitionImpl(edm::StreamContext const& iContext) {
140  using namespace edm;
141  switch (iContext.transition()) {
142  case StreamContext::Transition::kBeginRun:
143  return Phase::streamBeginRun;
144  case StreamContext::Transition::kBeginLuminosityBlock:
145  return Phase::streamBeginLumi;
146  case StreamContext::Transition::kEvent:
147  return Phase::Event;
148  case StreamContext::Transition::kEndLuminosityBlock:
149  return Phase::streamEndLumi;
150  case StreamContext::Transition::kEndRun:
151  return Phase::streamEndRun;
152  default:
153  break;
154  }
155  assert(false);
156  return Phase::Event;
157  }
158 
159  auto toTransition(edm::StreamContext const& iContext) -> std::underlying_type_t<Phase> {
160  return static_cast<std::underlying_type_t<Phase>>(toTransitionImpl(iContext));
161  }
162 
163  Phase toTransitionImpl(edm::GlobalContext const& iContext) {
164  using namespace edm;
165  switch (iContext.transition()) {
166  case GlobalContext::Transition::kBeginRun:
167  return Phase::globalBeginRun;
168  case GlobalContext::Transition::kBeginLuminosityBlock:
169  return Phase::globalBeginLumi;
170  case GlobalContext::Transition::kEndLuminosityBlock:
171  return Phase::globalEndLumi;
172  case GlobalContext::Transition::kWriteLuminosityBlock:
173  return Phase::globalEndLumi;
174  case GlobalContext::Transition::kEndRun:
175  return Phase::globalEndRun;
176  case GlobalContext::Transition::kWriteRun:
177  return Phase::globalEndRun;
178  default:
179  break;
180  }
181  assert(false);
182  return Phase::Event;
183  }
184  auto toTransition(edm::GlobalContext const& iContext) -> std::underlying_type_t<Phase> {
185  return static_cast<std::underlying_type_t<Phase>>(toTransitionImpl(iContext));
186  }
187 
188 } // namespace
189 
190 namespace edm {
191  namespace service {
192 
193  class StallMonitor {
194  public:
196  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
197 
198  private:
199  void preModuleConstruction(edm::ModuleDescription const&);
200  void preModuleDestruction(edm::ModuleDescription const&);
201  void postBeginJob();
202  void preSourceEvent(StreamID);
203  void postSourceEvent(StreamID);
204  void preEvent(StreamContext const&);
205  void preModuleEventAcquire(StreamContext const&, ModuleCallingContext const&);
206  void postModuleEventAcquire(StreamContext const&, ModuleCallingContext const&);
207  void preModuleEvent(StreamContext const&, ModuleCallingContext const&);
208  void postModuleEventPrefetching(StreamContext const&, ModuleCallingContext const&);
209  void preEventReadFromSource(StreamContext const&, ModuleCallingContext const&);
210  void postEventReadFromSource(StreamContext const&, ModuleCallingContext const&);
211  void postModuleEvent(StreamContext const&, ModuleCallingContext const&);
212  void postEvent(StreamContext const&);
213  void preModuleStreamTransition(StreamContext const&, ModuleCallingContext const&);
214  void postModuleStreamTransition(StreamContext const&, ModuleCallingContext const&);
215  void preModuleGlobalTransition(GlobalContext const&, ModuleCallingContext const&);
216  void postModuleGlobalTransition(GlobalContext const&, ModuleCallingContext const&);
217  void postEndJob();
218 
220  bool const validFile_; // Separate data member from file to improve efficiency.
221  duration_t const stallThreshold_;
222  decltype(now()) beginTime_{};
223 
224  // There can be multiple modules per stream. Therefore, we need
225  // the combination of StreamID and ModuleID to correctly track
226  // stalling information. We use tbb::concurrent_unordered_map
227  // for this purpose.
228  using StreamID_value = decltype(std::declval<StreamID>().value());
229  using ModuleID = decltype(std::declval<ModuleDescription>().id());
230  tbb::concurrent_unordered_map<std::pair<StreamID_value, ModuleID>,
231  std::pair<decltype(beginTime_), bool>,
233  stallStart_{};
234 
235  std::vector<std::string> moduleLabels_{};
236  std::vector<StallStatistics> moduleStats_{};
237  unsigned int numStreams_;
238  };
239 
240  } // namespace service
241 
242 } // namespace edm
243 
244 namespace {
245  constexpr char const* const filename_default{""};
246  constexpr double threshold_default{0.1}; //default threashold in seconds
247  std::string const space{" "};
248 } // namespace
249 
251 using namespace std::chrono;
252 
253 StallMonitor::StallMonitor(ParameterSet const& iPS, ActivityRegistry& iRegistry)
254  : file_{iPS.getUntrackedParameter<std::string>("fileName", filename_default)},
255  validFile_{file_},
257  std::chrono::round<duration_t>(duration<double>(iPS.getUntrackedParameter<double>("stallThreshold")))} {
264  iRegistry.watchPostEndJob(this, &StallMonitor::postEndJob);
265 
266  if (validFile_) {
267  // Only enable the following callbacks if writing to a file.
270  iRegistry.watchPreEvent(this, &StallMonitor::preEvent);
275  iRegistry.watchPostEvent(this, &StallMonitor::postEvent);
276 
281 
286 
293 
300 
301  iRegistry.preallocateSignal_.connect(
302  [this](service::SystemBounds const& iBounds) { numStreams_ = iBounds.maxNumberOfStreams(); });
303 
304  std::ostringstream oss;
305  oss << "# Transition Symbol\n";
306  oss << "#----------------- ------\n";
307  oss << "# globalBeginRun " << Phase::globalBeginRun << "\n"
308  << "# streamBeginRun " << Phase::streamBeginRun << "\n"
309  << "# globalBeginLumi " << Phase::globalBeginLumi << "\n"
310  << "# streamBeginLumi " << Phase::streamBeginLumi << "\n"
311  << "# Event " << Phase::Event << "\n"
312  << "# streamEndLumi " << Phase::streamEndLumi << "\n"
313  << "# globalEndLumi " << Phase::globalEndLumi << "\n"
314  << "# streamEndRun " << Phase::streamEndRun << "\n"
315  << "# globalEndRun " << Phase::globalEndRun << "\n";
316  oss << "# Step Symbol Entries\n"
317  << "# -------------------------- ------ ------------------------------------------\n"
318  << "# preSourceEvent " << step::preSourceEvent << " <Stream ID> <Time since beginJob (ms)>\n"
319  << "# postSourceEvent " << step::postSourceEvent << " <Stream ID> <Time since beginJob (ms)>\n"
320  << "# preEvent " << step::preEvent
321  << " <Stream ID> <Run#> <LumiBlock#> <Event#> <Time since beginJob (ms)>\n"
322  << "# postModuleEventPrefetching " << step::postModuleEventPrefetching
323  << " <Stream ID> <Module ID> <Time since beginJob (ms)>\n"
324  << "# preModuleEventAcquire " << step::preModuleEventAcquire
325  << " <Stream ID> <Module ID> <Time since beginJob (ms)>\n"
326  << "# postModuleEventAcquire " << step::postModuleEventAcquire
327  << " <Stream ID> <Module ID> <Time since beginJob (ms)>\n"
328  << "# preModuleTransition " << step::preModuleEvent
329  << " <Stream ID> <Module ID> <Transition type> <Time since beginJob (ms)>\n"
330  << "# preEventReadFromSource " << step::preEventReadFromSource
331  << " <Stream ID> <Module ID> <Time since beginJob (ms)>\n"
332  << "# postEventReadFromSource " << step::postEventReadFromSource
333  << " <Stream ID> <Module ID> <Time since beginJob (ms)>\n"
334  << "# postModuleTransition " << step::postModuleEvent
335  << " <Stream ID> <Module ID> <Transition type> <Time since beginJob (ms)>\n"
336  << "# postEvent " << step::postEvent
337  << " <Stream ID> <Run#> <LumiBlock#> <Event#> <Time since beginJob (ms)>\n";
338  file_.write(oss.str());
339  }
340 }
341 
344  desc.addUntracked<std::string>("fileName", filename_default)
345  ->setComment(
346  "Name of file to which detailed timing information should be written.\n"
347  "An empty filename argument (the default) indicates that no extra\n"
348  "information will be written to a dedicated file, but only the summary\n"
349  "including stalling-modules information will be logged.");
350  desc.addUntracked<double>("stallThreshold", threshold_default)
351  ->setComment(
352  "Threshold (in seconds) used to classify modules as stalled.\n"
353  "Microsecond granularity allowed.");
354  descriptions.add("StallMonitor", desc);
355  descriptions.setComment(
356  "This service keeps track of various times in event-processing to determine which modules are stalling.");
357 }
358 
360  // Module labels are dense, so if the module id is greater than the
361  // size of moduleLabels_, grow the vector to the correct index and
362  // assign the last entry to the desired label. Note that with the
363  // current implementation, there is no module with ID '0'. In
364  // principle, the module-information vectors are therefore each one
365  // entry too large. However, since removing the entry at the front
366  // makes for awkward indexing later on, and since the sizes of these
367  // extra entries are on the order of bytes, we will leave them in
368  // and skip over them later when printing out summaries. The
369  // extraneous entries can be identified by their module labels being
370  // empty.
371  auto const mid = md.id();
372  if (mid < moduleLabels_.size()) {
373  moduleLabels_[mid] = md.moduleLabel();
374  } else {
375  moduleLabels_.resize(mid + 1);
376  moduleLabels_.back() = md.moduleLabel();
377  }
378 }
379 
381  // Reset the module label back if the module is deleted before
382  // beginJob() so that the entry is ignored in the summary printouts.
383  moduleLabels_[md.id()] = "";
384 }
385 
387  // Since a (push,emplace)_back cannot be called for a vector of a
388  // type containing atomics (like 'StallStatistics')--i.e. atomics
389  // have no copy/move-assignment operators, we must specify the size
390  // of the vector at construction time.
391  moduleStats_ = std::vector<StallStatistics>(moduleLabels_.size());
392  for (std::size_t i{}; i < moduleStats_.size(); ++i) {
393  moduleStats_[i].setLabel(moduleLabels_[i]);
394  }
395 
396  if (validFile_) {
397  std::size_t const width{std::to_string(moduleLabels_.size()).size()};
398 
399  OStreamColumn col0{"Module ID", width};
400  std::string const lastCol{"Module label"};
401 
402  std::ostringstream oss;
403  oss << "\n# " << col0 << space << lastCol << '\n';
404  oss << "# " << std::string(col0.width() + space.size() + lastCol.size(), '-') << '\n';
405 
406  for (std::size_t i{}; i < moduleLabels_.size(); ++i) {
407  auto const& label = moduleLabels_[i];
408  if (label.empty())
409  continue; // See comment in filling of moduleLabels_;
410  oss << "#M " << std::setw(width) << std::left << col0(i) << space << std::left << moduleLabels_[i] << '\n';
411  }
412  oss << '\n';
413  file_.write(oss.str());
414  }
415  // Don't need the labels anymore--info. is now part of the
416  // module-statistics objects.
417  moduleLabels_.clear();
418 
419  beginTime_ = now();
420 }
421 
423  auto const t = duration_cast<duration_t>(now() - beginTime_).count();
424  auto msg = assembleMessage<step::preSourceEvent>(sid.value(), t);
426 }
427 
429  auto const t = duration_cast<duration_t>(now() - beginTime_).count();
430  auto msg = assembleMessage<step::postSourceEvent>(sid.value(), t);
432 }
433 
435  auto const t = duration_cast<duration_t>(now() - beginTime_).count();
436  auto const& eid = sc.eventID();
437  auto msg = assembleMessage<step::preEvent>(stream_id(sc), eid.run(), eid.luminosityBlock(), eid.event(), t);
439 }
440 
442  auto const sid = stream_id(sc);
443  auto const mid = module_id(mcc);
444  auto start = stallStart_[std::make_pair(sid, mid)] = std::make_pair(now(), false);
445 
446  if (validFile_) {
447  auto const t = duration_cast<duration_t>(start.first - beginTime_).count();
448  auto msg = assembleMessage<step::postModuleEventPrefetching>(sid, mid, t);
450  }
451 }
452 
454  auto const preModEventAcquire = now();
455  auto const sid = stream_id(sc);
456  auto const mid = module_id(mcc);
457  auto& start = stallStart_[std::make_pair(sid, mid)];
458  auto startT = start.first.time_since_epoch();
459  start.second = true; // record so the preModuleEvent knows that acquire was called
460  if (validFile_) {
461  auto t = duration_cast<duration_t>(preModEventAcquire - beginTime_).count();
462  auto msg = assembleMessage<step::preModuleEventAcquire>(sid, mid, t);
464  }
465  // Check for stalls if prefetch was called
466  if (duration_t::duration::zero() != startT) {
467  auto const preFetch_to_preModEventAcquire = duration_cast<duration_t>(preModEventAcquire - start.first);
468  if (preFetch_to_preModEventAcquire < stallThreshold_)
469  return;
470  moduleStats_[mid].update(preFetch_to_preModEventAcquire);
471  }
472 }
473 
475  auto const postModEventAcquire = duration_cast<duration_t>(now() - beginTime_).count();
476  auto msg = assembleMessage<step::postModuleEventAcquire>(stream_id(sc), module_id(mcc), postModEventAcquire);
478 }
479 
481  auto const preModEvent = now();
482  auto const sid = stream_id(sc);
483  auto const mid = module_id(mcc);
484  auto const& start = stallStart_[std::make_pair(sid, mid)];
485  auto startT = start.first.time_since_epoch();
486  if (validFile_) {
487  auto t = duration_cast<duration_t>(preModEvent - beginTime_).count();
488  auto msg =
489  assembleMessage<step::preModuleEvent>(sid, mid, static_cast<std::underlying_type_t<Phase>>(Phase::Event), t);
491  }
492  // Check for stalls if prefetch was called and we did not already check before acquire
493  if (duration_t::duration::zero() != startT && !start.second) {
494  auto const preFetch_to_preModEvent = duration_cast<duration_t>(preModEvent - start.first);
495  if (preFetch_to_preModEvent < stallThreshold_)
496  return;
497  moduleStats_[mid].update(preFetch_to_preModEvent);
498  }
499 }
500 
502  auto const tNow = now();
503  auto const sid = stream_id(sc);
504  auto const mid = module_id(mcc);
505  auto t = duration_cast<duration_t>(tNow - beginTime_).count();
506  auto msg = assembleMessage<step::preModuleEvent>(sid, mid, toTransition(sc), t);
508 }
509 
511  auto const t = duration_cast<duration_t>(now() - beginTime_).count();
512  auto msg = assembleMessage<step::postModuleEvent>(stream_id(sc), module_id(mcc), toTransition(sc), t);
514 }
515 
517  auto t = duration_cast<duration_t>(now() - beginTime_).count();
518  auto msg = assembleMessage<step::preModuleEvent>(numStreams_, module_id(mcc), toTransition(gc), t);
520 }
521 
523  auto const postModTime = duration_cast<duration_t>(now() - beginTime_).count();
524  auto msg = assembleMessage<step::postModuleEvent>(numStreams_, module_id(mcc), toTransition(gc), postModTime);
526 }
527 
529  auto const t = duration_cast<duration_t>(now() - beginTime_).count();
530  auto msg = assembleMessage<step::preEventReadFromSource>(stream_id(sc), module_id(mcc), t);
532 }
533 
535  auto const t = duration_cast<duration_t>(now() - beginTime_).count();
536  auto msg = assembleMessage<step::postEventReadFromSource>(stream_id(sc), module_id(mcc), t);
538 }
539 
541  auto const postModEvent = duration_cast<duration_t>(now() - beginTime_).count();
542  auto msg = assembleMessage<step::postModuleEvent>(
543  stream_id(sc), module_id(mcc), static_cast<std::underlying_type_t<Phase>>(Phase::Event), postModEvent);
545 }
546 
548  auto const t = duration_cast<duration_t>(now() - beginTime_).count();
549  auto const& eid = sc.eventID();
550  auto msg = assembleMessage<step::postEvent>(stream_id(sc), eid.run(), eid.luminosityBlock(), eid.event(), t);
552 }
553 
555  // Prepare summary
556  std::size_t width{};
557  edm::for_all(moduleStats_, [&width](auto const& stats) {
558  if (stats.numberOfStalls() == 0u)
559  return;
560  width = std::max(width, stats.label().size());
561  });
562 
563  OStreamColumn tag{"StallMonitor>"};
564  OStreamColumn col1{"Module label", width};
565  OStreamColumn col2{"# of stalls"};
566  OStreamColumn col3{"Total stalled time"};
567  OStreamColumn col4{"Max stalled time"};
568 
569  LogAbsolute out{"StallMonitor"};
570  out << '\n';
571  out << tag << space << col1 << space << col2 << space << col3 << space << col4 << '\n';
572 
573  out << tag << space << std::setfill('-') << col1(std::string{}) << space << col2(std::string{}) << space
574  << col3(std::string{}) << space << col4(std::string{}) << '\n';
575 
576  using seconds_d = duration<double>;
577 
578  auto to_seconds_str = [](auto const& duration) {
579  std::ostringstream oss;
580  auto const time = duration_cast<seconds_d>(duration).count();
581  oss << time << " s";
582  return oss.str();
583  };
584 
585  out << std::setfill(' ');
586  for (auto const& stats : moduleStats_) {
587  if (stats.label().empty() || // See comment in filling of moduleLabels_;
588  stats.numberOfStalls() == 0u)
589  continue;
590  out << std::left << tag << space << col1(stats.label()) << space << std::right << col2(stats.numberOfStalls())
591  << space << col3(to_seconds_str(stats.totalStalledTime())) << space
592  << col4(to_seconds_str(stats.maxStalledTime())) << '\n';
593  }
594 }
595 
void watchPostModuleGlobalEndLumi(PostModuleGlobalEndLumi::slot_type const &iSlot)
void watchPreModuleGlobalBeginRun(PreModuleGlobalBeginRun::slot_type const &iSlot)
T getUntrackedParameter(std::string const &, T const &) const
void watchPreEvent(PreEvent::slot_type const &iSlot)
string rep
Definition: cuy.py:1189
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void preModuleEvent(StreamContext const &, ModuleCallingContext const &)
void watchPreModuleEventAcquire(PreModuleEventAcquire::slot_type const &iSlot)
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
void watchPreModuleEvent(PreModuleEvent::slot_type const &iSlot)
void watchPreModuleConstruction(PreModuleConstruction::slot_type const &iSlot)
void preSourceEvent(StreamID)
unique_ptr< ClusterSequence > cs
ThreadSafeOutputFileStream file_
void watchPostEvent(PostEvent::slot_type const &iSlot)
void postEvent(StreamContext const &)
decltype(now()) beginTime_
void watchPreEventReadFromSource(PreEventReadFromSource::slot_type const &iSlot)
void watchPreModuleDestruction(PreModuleDestruction::slot_type const &iSlot)
void watchPostModuleEvent(PostModuleEvent::slot_type const &iSlot)
void watchPostModuleGlobalBeginLumi(PostModuleGlobalBeginLumi::slot_type const &iSlot)
void watchPostModuleStreamEndLumi(PostModuleStreamEndLumi::slot_type const &iSlot)
Phase
void watchPostModuleStreamBeginRun(PostModuleStreamBeginRun::slot_type const &iSlot)
void watchPostSourceEvent(PostSourceEvent::slot_type const &iSlot)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
assert(be >=bs)
std::string const & moduleLabel() const
void watchPreModuleGlobalEndRun(PreModuleGlobalEndRun::slot_type const &iSlot)
void preModuleConstruction(edm::ModuleDescription const &)
void watchPostModuleWriteRun(PostModuleWriteRun::slot_type const &iSlot)
void preModuleStreamTransition(StreamContext const &, ModuleCallingContext const &)
void preModuleDestruction(edm::ModuleDescription const &)
void watchPostModuleWriteLumi(PostModuleWriteLumi::slot_type const &iSlot)
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:14
Preallocate preallocateSignal_
signal is emitted before beginJob
void watchPostModuleEventPrefetching(PostModuleEventPrefetching::slot_type const &iSlot)
unsigned int maxNumberOfStreams() const
Definition: SystemBounds.h:35
std::vector< std::string > moduleLabels_
char const * label
Transition transition() const
Definition: StreamContext.h:55
void postModuleEventPrefetching(StreamContext const &, ModuleCallingContext const &)
void preEventReadFromSource(StreamContext const &, ModuleCallingContext const &)
def move
Definition: eostools.py:511
ModuleDescription const * moduleDescription() const
void watchPostModuleEventAcquire(PostModuleEventAcquire::slot_type const &iSlot)
duration_t const stallThreshold_
void preEvent(StreamContext const &)
void watchPreModuleGlobalBeginLumi(PreModuleGlobalBeginLumi::slot_type const &iSlot)
void watchPostModuleStreamEndRun(PostModuleStreamEndRun::slot_type const &iSlot)
StreamID const & streamID() const
Definition: StreamContext.h:54
void watchPreModuleStreamBeginLumi(PreModuleStreamBeginLumi::slot_type const &iSlot)
void preModuleEventAcquire(StreamContext const &, ModuleCallingContext const &)
#define DEFINE_FWK_SERVICE(type)
Definition: ServiceMaker.h:96
void setComment(std::string const &value)
void postModuleEventAcquire(StreamContext const &, ModuleCallingContext const &)
unsigned int value() const
Definition: StreamID.h:43
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void postEventReadFromSource(StreamContext const &, ModuleCallingContext const &)
void watchPostModuleGlobalEndRun(PostModuleGlobalEndRun::slot_type const &iSlot)
void postModuleGlobalTransition(GlobalContext const &, ModuleCallingContext const &)
void watchPostModuleStreamBeginLumi(PostModuleStreamBeginLumi::slot_type const &iSlot)
void watchPreModuleStreamEndLumi(PreModuleStreamEndLumi::slot_type const &iSlot)
void watchPreModuleStreamBeginRun(PreModuleStreamBeginRun::slot_type const &iSlot)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
tuple msg
Definition: mps_check.py:285
double S(const TLorentzVector &, const TLorentzVector &)
Definition: Particle.cc:97
void watchPreModuleWriteRun(PreModuleWriteRun::slot_type const &iSlot)
tbb::concurrent_unordered_map< std::pair< StreamID_value, ModuleID >, std::pair< decltype(beginTime_), bool >, edm::StdPairHasher > stallStart_
void postModuleStreamTransition(StreamContext const &, ModuleCallingContext const &)
void postSourceEvent(StreamID)
void postModuleEvent(StreamContext const &, ModuleCallingContext const &)
decltype(std::declval< StreamID >().value()) StreamID_value
Transition transition() const
Definition: GlobalContext.h:53
#define update(a, b)
void watchPreModuleStreamEndRun(PreModuleStreamEndRun::slot_type const &iSlot)
void watchPostEventReadFromSource(PostEventReadFromSource::slot_type const &iSlot)
void watchPostModuleGlobalBeginRun(PostModuleGlobalBeginRun::slot_type const &iSlot)
void watchPreModuleWriteLumi(PreModuleWriteLumi::slot_type const &iSlot)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< StallStatistics > moduleStats_
EventID const & eventID() const
Definition: StreamContext.h:59
step
Definition: StallMonitor.cc:94
void watchPreSourceEvent(PreSourceEvent::slot_type const &iSlot)
decltype(std::declval< ModuleDescription >().id()) ModuleID
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
long double T
tuple size
Write out results.
void connect(U iFunc)
Definition: Signal.h:64
void watchPreModuleGlobalEndLumi(PreModuleGlobalEndLumi::slot_type const &iSlot)
void preModuleGlobalTransition(GlobalContext const &, ModuleCallingContext const &)
unsigned int id() const
void watchPostBeginJob(PostBeginJob::slot_type const &iSlot)
convenience function for attaching to signal