CMS 3D CMS Logo

FastTimerService.h
Go to the documentation of this file.
1 #ifndef FastTimerService_h
2 #define FastTimerService_h
3 
4 // system headers
5 #include <unistd.h>
6 
7 // C++ headers
8 #include <chrono>
9 #include <cmath>
10 #include <map>
11 #include <mutex>
12 #include <string>
13 #include <unordered_map>
14 
15 // boost headers
16 #include <boost/chrono.hpp>
17 
18 // tbb headers
19 #include <tbb/concurrent_unordered_set.h>
20 #include <tbb/enumerable_thread_specific.h>
21 #include <tbb/task_scheduler_observer.h>
22 
23 // JSON headers
24 #include <nlohmann/json_fwd.hpp>
26 
27 // CMSSW headers
46 
47 /*
48 procesing time is divided into
49  - source
50  - event processing, sum of the time spent in all the modules
51 */
52 
53 class FastTimerService : public tbb::task_scheduler_observer {
54 public:
56  ~FastTimerService() override = default;
57 
58 private:
59  void ignoredSignal(const std::string& signal) const;
60  void unsupportedSignal(const std::string& signal) const;
61 
62  // these signal pairs are not guaranteed to happen in the same thread
63 
65 
67  void postBeginJob();
68 
69  void postEndJob();
70 
73 
76 
79 
82 
85 
88 
91 
94 
95  void preEvent(edm::StreamContext const&);
96  void postEvent(edm::StreamContext const&);
97 
100 
103 
104  // these signal pairs are guaranteed to be called within the same thread
105 
106  //void preOpenFile(std::string const&, bool);
107  //void postOpenFile(std::string const&, bool);
108 
109  //void preCloseFile(std::string const&, bool);
110  //void postCloseFile(std::string const&, bool);
111 
113  //void postSourceConstruction(edm::ModuleDescription const&);
114 
117 
120 
123 
124  //void preModuleConstruction(edm::ModuleDescription const&);
125  //void postModuleConstruction(edm::ModuleDescription const&);
126 
127  //void preModuleBeginJob(edm::ModuleDescription const&);
128  //void postModuleBeginJob(edm::ModuleDescription const&);
129 
130  //void preModuleEndJob(edm::ModuleDescription const&);
131  //void postModuleEndJob(edm::ModuleDescription const&);
132 
133  //void preModuleBeginStream(edm::StreamContext const&, edm::ModuleCallingContext const&);
134  //void postModuleBeginStream(edm::StreamContext const&, edm::ModuleCallingContext const&);
135 
136  //void preModuleEndStream(edm::StreamContext const&, edm::ModuleCallingContext const&);
137  //void postModuleEndStream(edm::StreamContext const&, edm::ModuleCallingContext const&);
138 
141 
144 
147 
150 
153 
156 
159 
162 
165 
168 
171 
174 
175  // inherited from TBB task_scheduler_observer
176  void on_scheduler_entry(bool worker) final;
177  void on_scheduler_exit(bool worker) final;
178 
179 public:
180  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
181 
182 private:
183  // forward declarations
184  struct Resources;
185  struct AtomicResources;
186 
187  // per-thread measurements
188  struct Measurement {
189  public:
190  Measurement() noexcept;
191  // take per-thread measurements
192  void measure() noexcept;
193  // take per-thread measurements, compute the delta with respect to the previous measurement, and store them in the argument
194  void measure_and_store(Resources& store) noexcept;
195  // take per-thread measurements, compute the delta with respect to the previous measurement, and add them to the argument
196  void measure_and_accumulate(Resources& store) noexcept;
197  void measure_and_accumulate(AtomicResources& store) noexcept;
198 
199  public:
200 #ifdef DEBUG_THREAD_CONCURRENCY
202 #endif // DEBUG_THREAD_CONCURRENCY
203  boost::chrono::thread_clock::time_point time_thread;
204  boost::chrono::high_resolution_clock::time_point time_real;
207  };
208 
209  // highlight a group of modules
210  struct GroupOfModules {
211  public:
213  std::vector<unsigned int> modules;
214  };
215 
216  // resources being monitored by the service
217  struct Resources {
218  public:
219  Resources();
220  void reset();
221 
223  Resources& operator+=(struct AtomicResources const& other);
224  Resources operator+(Resources const& other) const;
225  Resources operator+(struct AtomicResources const& other) const;
226 
227  public:
232  };
233 
234  // atomic version of Resources
235  // Note: the structure as a whole is *not* atomic, only the individual fields are
237  public:
238  AtomicResources();
240  void reset();
241 
246  Resources operator+(Resources const& other) const;
247 
248  public:
249  std::atomic<boost::chrono::nanoseconds::rep> time_thread;
250  std::atomic<boost::chrono::nanoseconds::rep> time_real;
251  std::atomic<uint64_t> allocated;
252  std::atomic<uint64_t> deallocated;
253  };
254 
255  // resources associated to each module, path, process and job
256 
258  public:
259  ResourcesPerModule() noexcept;
260  void reset() noexcept;
261 
264 
265  public:
267  unsigned events;
268  bool has_acquire; // whether this module has an acquire() method
269  };
270 
272  public:
273  void reset();
276 
277  public:
278  Resources active; // resources used by all modules on this path
279  Resources total; // resources used by all modules on this path, and their dependencies
280  unsigned last; // one-past-the last module that ran on this path
281  bool status; // whether the path accepted or rejected the event
282  };
283 
285  public:
287  void reset();
290 
291  public:
293  std::vector<ResourcesPerPath> paths;
294  std::vector<ResourcesPerPath> endpaths;
295  };
296 
298  public:
299  ResourcesPerJob() = default;
300  ResourcesPerJob(ProcessCallGraph const& job, std::vector<GroupOfModules> const& groups);
301  void reset();
304 
305  public:
308  Resources event; // total time etc. spent between preSourceEvent and postEvent
310  std::vector<Resources> highlight;
311  std::vector<ResourcesPerModule> modules;
312  std::vector<ResourcesPerProcess> processes;
313  unsigned events;
314  };
315 
316  // plot ranges and resolution
317  struct PlotRanges {
318  double time_range;
320  double memory_range;
322  };
323 
324  // plots associated to each module or other element (path, process, etc)
326  public:
327  PlotsPerElement() = default;
329  std::string const& name,
330  std::string const& title,
331  PlotRanges const& ranges,
332  unsigned int lumisections,
333  bool byls);
334  void fill(Resources const&, unsigned int lumisection);
335  void fill(AtomicResources const&, unsigned int lumisection);
336  void fill_fraction(Resources const&, Resources const&, unsigned int lumisection);
337 
338  private:
339  // resources spent in the module
348  };
349 
350  // plots associated to each path or endpath
351  class PlotsPerPath {
352  public:
353  PlotsPerPath() = default;
355  std::string const&,
356  ProcessCallGraph const&,
358  PlotRanges const& ranges,
359  unsigned int lumisections,
360  bool byls);
361  void fill(ProcessCallGraph::PathType const&,
362  ResourcesPerJob const&,
363  ResourcesPerPath const&,
364  unsigned int lumisection);
365 
366  private:
367  // resources spent in all the modules in the path, including their dependencies
369 
370  // Note:
371  // a TH1F has 7 significant digits, while a 24-hour long run could process
372  // order of 10 billion events; a 64-bit long integer would work and might
373  // be better suited than a double, but there is no "TH1L" in ROOT.
374 
375  // how many times each module and their dependencies has run
377  // resources spent in each module and their dependencies
382  };
383 
385  public:
388  ProcessCallGraph const&,
390  PlotRanges const& event_ranges,
391  PlotRanges const& path_ranges,
392  unsigned int lumisections,
393  bool bypath,
394  bool byls);
395  void fill(ProcessCallGraph::ProcessType const&, ResourcesPerJob const&, ResourcesPerProcess const&, unsigned int ls);
396 
397  private:
398  // resources spent in all the modules of the (sub)process
400  // resources spent in each path and endpath
401  std::vector<PlotsPerPath> paths_;
402  std::vector<PlotsPerPath> endpaths_;
403  };
404 
405  class PlotsPerJob {
406  public:
407  PlotsPerJob(ProcessCallGraph const& job, std::vector<GroupOfModules> const& groups);
409  ProcessCallGraph const&,
410  std::vector<GroupOfModules> const&,
411  PlotRanges const& event_ranges,
412  PlotRanges const& path_ranges,
413  PlotRanges const& module_ranges,
414  unsigned int lumisections,
415  bool bymodule,
416  bool bypath,
417  bool byls,
418  bool transitions);
419  void fill(ProcessCallGraph const&, ResourcesPerJob const&, unsigned int ls);
420  void fill_run(AtomicResources const&);
421  void fill_lumi(AtomicResources const&, unsigned int lumisection);
422 
423  private:
424  // resources spent in all the modules of the job
428  // resources spent in the modules' lumi and run transitions
431  // resources spent in the highlighted modules
432  std::vector<PlotsPerElement> highlight_;
433  // resources spent in each module
434  std::vector<PlotsPerElement> modules_;
435  // resources spent in each (sub)process
436  std::vector<PlotsPerProcess> processes_;
437  };
438 
439  // keep track of the dependencies among modules
441 
442  // per-stream information
443  std::vector<ResourcesPerJob> streams_;
444 
445  // concurrent histograms and profiles
446  std::unique_ptr<PlotsPerJob> plots_;
447 
448  // per-lumi and per-run information
449  std::vector<AtomicResources> lumi_transition_; // resources spent in the modules' global and stream lumi transitions
450  std::vector<AtomicResources> run_transition_; // resources spent in the modules' global and stream run transitions
451  AtomicResources overhead_; // resources spent outside of the modules' transitions
452 
453  // summary data
454  ResourcesPerJob job_summary_; // whole event time accounting per-job
455  std::vector<ResourcesPerJob> run_summary_; // whole event time accounting per-run
456  std::mutex summary_mutex_; // synchronise access to the summary objects across different threads
457 
458  // per-thread quantities, lazily allocated
459  tbb::enumerable_thread_specific<Measurement, tbb::cache_aligned_allocator<Measurement>, tbb::ets_key_per_instance>
461 
462  // atomic variables to keep track of the completion of each step, process by process
463  std::unique_ptr<std::atomic<unsigned int>[]> subprocess_event_check_;
464  std::unique_ptr<std::atomic<unsigned int>[]> subprocess_global_lumi_check_;
465  std::unique_ptr<std::atomic<unsigned int>[]> subprocess_global_run_check_;
466 
467  // retrieve the current thread's per-thread quantities
468  Measurement& thread();
469 
470  // job configuration
471  unsigned int concurrent_lumis_;
472  unsigned int concurrent_runs_;
473  unsigned int concurrent_streams_;
474  unsigned int concurrent_threads_;
475 
476  // logging configuration
477  const bool print_event_summary_; // print the time spent in each process, path and module after every event
478  const bool print_run_summary_; // print the time spent in each process, path and module for each run
479  const bool print_job_summary_; // print the time spent in each process, path and module for the whole job
480 
481  // JSON configuration
482  //const bool write_json_per_event_;
483  //const bool write_json_per_ls_;
484  //const bool write_json_per_run_;
487 
488  // dqm configuration
489  bool enable_dqm_; // non const, depends on the availability of the DQMStore
491  const bool enable_dqm_bypath_;
492  const bool enable_dqm_byls_;
495 
499  const unsigned int dqm_lumisections_range_;
501 
502  std::vector<edm::ParameterSet> highlight_module_psets_; // non-const, cleared in postBeginJob()
503  std::vector<GroupOfModules> highlight_modules_; // non-const, filled in postBeginJob()
504 
505  // log unsupported signals
506  mutable tbb::concurrent_unordered_set<std::string> unsupported_signals_; // keep track of unsupported signals received
507 
508  // print the resource usage summary for en event, a run, or the while job
509  template <typename T>
510  void printHeader(T& out, std::string const& label) const;
511 
512  template <typename T>
513  void printEventHeader(T& out, std::string const& label) const;
514 
515  template <typename T>
516  void printEventLine(T& out, Resources const& data, std::string const& label) const;
517 
518  template <typename T>
519  void printEventLine(T& out, AtomicResources const& data, std::string const& label) const;
520 
521  template <typename T>
522  void printEvent(T& out, ResourcesPerJob const&) const;
523 
524  template <typename T>
525  void printSummaryHeader(T& out, std::string const& label, bool detailed) const;
526 
527  template <typename T>
528  void printPathSummaryHeader(T& out, std::string const& label) const;
529 
530  template <typename T>
531  void printSummaryLine(T& out, Resources const& data, uint64_t events, std::string const& label) const;
532 
533  template <typename T>
534  void printSummaryLine(T& out, Resources const& data, uint64_t events, uint64_t active, std::string const& label) const;
535 
536  template <typename T>
537  void printSummaryLine(T& out, AtomicResources const& data, uint64_t events, std::string const& label) const;
538 
539  template <typename T>
540  void printSummaryLine(
541  T& out, AtomicResources const& data, uint64_t events, uint64_t active, std::string const& label) const;
542 
543  template <typename T>
545  T& out, Resources const& data, Resources const& total, uint64_t events, std::string const& label) const;
546 
547  template <typename T>
548  void printSummary(T& out, ResourcesPerJob const& data, std::string const& label) const;
549 
550  template <typename T>
551  void printTransition(T& out, AtomicResources const& data, std::string const& label) const;
552 
553  template <typename T>
554  json encodeToJSON(std::string const& type, std::string const& label, unsigned int events, T const& data) const;
555 
557 
558  void writeSummaryJSON(ResourcesPerJob const& data, std::string const& filename) const;
559 
560  // check if this is the first process being signalled
563 
564  // check if this is the lest process being signalled
565  bool isLastSubprocess(std::atomic<unsigned int>& check);
566 };
567 
568 #endif // ! FastTimerService_h
FastTimerService::ResourcesPerJob::event_measurement
Measurement event_measurement
Definition: FastTimerService.h:309
ConfigurationDescriptions.h
FastTimerService::PlotsPerPath
Definition: FastTimerService.h:351
FastTimerService::enable_dqm_bynproc_
const bool enable_dqm_bynproc_
Definition: FastTimerService.h:493
FastTimerService::preSourceEvent
void preSourceEvent(edm::StreamID)
Definition: FastTimerService.cc:1445
edm::StreamID
Definition: StreamID.h:30
FastTimerService::json_filename_
const std::string json_filename_
Definition: FastTimerService.h:486
FastTimerService::ResourcesPerJob::highlight
std::vector< Resources > highlight
Definition: FastTimerService.h:310
eostools.ls
def ls(path, rec=False)
Definition: eostools.py:349
FastTimerService::AtomicResources::time_thread
std::atomic< boost::chrono::nanoseconds::rep > time_thread
Definition: FastTimerService.h:249
diffTwoXMLs.ranges
string ranges
Definition: diffTwoXMLs.py:79
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
FastTimerService::concurrent_threads_
unsigned int concurrent_threads_
Definition: FastTimerService.h:474
FastTimerService::ResourcesPerPath::status
bool status
Definition: FastTimerService.h:281
FastTimerService::ResourcesPerProcess
Definition: FastTimerService.h:284
FastTimerService::postStreamBeginLumi
void postStreamBeginLumi(edm::StreamContext const &)
Definition: FastTimerService.cc:1057
FastTimerService::GroupOfModules::modules
std::vector< unsigned int > modules
Definition: FastTimerService.h:213
FastTimerService::postSourceEvent
void postSourceEvent(edm::StreamID)
Definition: FastTimerService.cc:1459
FastTimerService::PlotsPerJob::modules_
std::vector< PlotsPerElement > modules_
Definition: FastTimerService.h:434
ModuleCallingContext.h
FastTimerService::ResourcesPerJob::operator+=
ResourcesPerJob & operator+=(ResourcesPerJob const &other)
Definition: FastTimerService.cc:277
FastTimerService::preBeginJob
void preBeginJob(edm::PathsAndConsumesOfModulesBase const &, edm::ProcessContext const &)
Definition: FastTimerService.cc:970
FastTimerService::ResourcesPerModule::operator+
ResourcesPerModule operator+(ResourcesPerModule const &other) const
Definition: FastTimerService.cc:192
FastTimerService::GroupOfModules::label
std::string label
Definition: FastTimerService.h:212
FastTimerService::printEvent
void printEvent(T &out, ResourcesPerJob const &) const
FastTimerService::preModuleStreamBeginLumi
void preModuleStreamBeginLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1619
FastTimerService::callgraph_
ProcessCallGraph callgraph_
Definition: FastTimerService.h:440
FastTimerService::ResourcesPerModule::reset
void reset() noexcept
Definition: FastTimerService.cc:179
MessageLogger.h
FastTimerService::streams_
std::vector< ResourcesPerJob > streams_
Definition: FastTimerService.h:443
FastTimerService::preModuleGlobalBeginRun
void preModuleGlobalBeginRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1565
FastTimerService::concurrent_streams_
unsigned int concurrent_streams_
Definition: FastTimerService.h:473
FastTimerService::ResourcesPerJob::ResourcesPerJob
ResourcesPerJob()=default
FastTimerService::preSourceLumi
void preSourceLumi(edm::LuminosityBlockIndex)
Definition: FastTimerService.cc:1090
FastTimerService::Measurement::measure
void measure() noexcept
Definition: FastTimerService.cc:306
FastTimerService::highlight_module_psets_
std::vector< edm::ParameterSet > highlight_module_psets_
Definition: FastTimerService.h:502
FastTimerService::ResourcesPerJob::modules
std::vector< ResourcesPerModule > modules
Definition: FastTimerService.h:311
FastTimerService::PlotsPerProcess::PlotsPerProcess
PlotsPerProcess(ProcessCallGraph::ProcessType const &)
Definition: FastTimerService.cc:633
FastTimerService::ResourcesPerProcess::endpaths
std::vector< ResourcesPerPath > endpaths
Definition: FastTimerService.h:294
FastTimerService::ResourcesPerProcess::paths
std::vector< ResourcesPerPath > paths
Definition: FastTimerService.h:293
cond::time::nanoseconds
boost::date_time::subsecond_duration< boost::posix_time::time_duration, 1000000000 > nanoseconds
Definition: TimeConversions.h:16
FastTimerService::AtomicResources::deallocated
std::atomic< uint64_t > deallocated
Definition: FastTimerService.h:252
FastTimerService::ResourcesPerModule
Definition: FastTimerService.h:257
FastTimerService::AtomicResources
Definition: FastTimerService.h:236
TriggerNamesService.h
FastTimerService::postEvent
void postEvent(edm::StreamContext const &)
Definition: FastTimerService.cc:1397
FastTimerService::ResourcesPerJob::reset
void reset()
Definition: FastTimerService.cc:264
FastTimerService::postModuleEvent
void postModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1526
FastTimerService::PlotRanges::memory_range
double memory_range
Definition: FastTimerService.h:320
FastTimerService::print_job_summary_
const bool print_job_summary_
Definition: FastTimerService.h:479
edm::ProcessContext
Definition: ProcessContext.h:27
FastTimerService::preSourceConstruction
void preSourceConstruction(edm::ModuleDescription const &)
Definition: FastTimerService.cc:966
FastTimerService::PlotsPerJob::fill_run
void fill_run(AtomicResources const &)
Definition: FastTimerService.cc:749
FastTimerService::preGlobalBeginLumi
void preGlobalBeginLumi(edm::GlobalContext const &)
Definition: FastTimerService.cc:1020
FastTimerService::FastTimerService
FastTimerService(const edm::ParameterSet &, edm::ActivityRegistry &)
Definition: FastTimerService.cc:761
FastTimerService::postEndJob
void postEndJob()
Definition: FastTimerService.cc:1096
FastTimerService::overhead_
AtomicResources overhead_
Definition: FastTimerService.h:451
FastTimerService::ResourcesPerPath::reset
void reset()
Definition: FastTimerService.cc:201
FastTimerService::concurrent_runs_
unsigned int concurrent_runs_
Definition: FastTimerService.h:472
FastTimerService::enable_dqm_bypath_
const bool enable_dqm_bypath_
Definition: FastTimerService.h:491
FastTimerService::run_summary_
std::vector< ResourcesPerJob > run_summary_
Definition: FastTimerService.h:455
FastTimerService::on_scheduler_exit
void on_scheduler_exit(bool worker) final
Definition: FastTimerService.cc:1642
FastTimerService::postModuleStreamEndRun
void postModuleStreamEndRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1614
FastTimerService::enable_dqm_transitions_
const bool enable_dqm_transitions_
Definition: FastTimerService.h:494
FastTimerService::writeSummaryJSON
void writeSummaryJSON(ResourcesPerJob const &data, std::string const &filename) const
Definition: FastTimerService.cc:1351
FastTimerService::dqm_module_ranges_
const PlotRanges dqm_module_ranges_
Definition: FastTimerService.h:498
FastTimerService::job_summary_
ResourcesPerJob job_summary_
Definition: FastTimerService.h:454
FastTimerService::PlotsPerElement::time_thread_byls_
dqm::reco::MonitorElement * time_thread_byls_
Definition: FastTimerService.h:341
FastTimerService::ResourcesPerPath::active
Resources active
Definition: FastTimerService.h:278
FastTimerService::concurrent_lumis_
unsigned int concurrent_lumis_
Definition: FastTimerService.h:471
DQMStore.h
FastTimerService::dqm_event_ranges_
const PlotRanges dqm_event_ranges_
Definition: FastTimerService.h:496
FastTimerService::preGlobalBeginRun
void preGlobalBeginRun(edm::GlobalContext const &)
Definition: FastTimerService.cc:890
FastTimerService::isLastSubprocess
bool isLastSubprocess(std::atomic< unsigned int > &check)
Definition: FastTimerService.cc:1388
FastTimerService::AtomicResources::time_real
std::atomic< boost::chrono::nanoseconds::rep > time_real
Definition: FastTimerService.h:250
FastTimerService::PlotsPerElement::time_thread_
dqm::reco::MonitorElement * time_thread_
Definition: FastTimerService.h:340
FastTimerService::postSourceLumi
void postSourceLumi(edm::LuminosityBlockIndex)
Definition: FastTimerService.cc:1092
FastTimerService::preModuleEvent
void preModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1520
FastTimerService::unsupportedSignal
void unsupportedSignal(const std::string &signal) const
Definition: FastTimerService.cc:882
FastTimerService::preModuleEventAcquire
void preModuleEventAcquire(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1503
FastTimerService::encodeToJSON
json encodeToJSON(std::string const &type, std::string const &label, unsigned int events, T const &data) const
patZpeak.events
events
Definition: patZpeak.py:20
FastTimerService::subprocess_global_run_check_
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_global_run_check_
Definition: FastTimerService.h:465
FastTimerService::AtomicResources::allocated
std::atomic< uint64_t > allocated
Definition: FastTimerService.h:251
FastTimerService::enable_dqm_
bool enable_dqm_
Definition: FastTimerService.h:489
FastTimerService::subprocess_global_lumi_check_
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_global_lumi_check_
Definition: FastTimerService.h:464
FastTimerService::dqm_path_
std::string dqm_path_
Definition: FastTimerService.h:500
FastTimerService::printTransition
void printTransition(T &out, AtomicResources const &data, std::string const &label) const
FastTimerService::ResourcesPerModule::ResourcesPerModule
ResourcesPerModule() noexcept
Definition: FastTimerService.cc:177
FastTimerService::PlotsPerProcess::book
void book(dqm::reco::DQMStore::IBooker &, ProcessCallGraph const &, ProcessCallGraph::ProcessType const &, PlotRanges const &event_ranges, PlotRanges const &path_ranges, unsigned int lumisections, bool bypath, bool byls)
Definition: FastTimerService.cc:636
FastTimerService::PlotRanges
Definition: FastTimerService.h:317
FastTimerService::preallocate
void preallocate(edm::service::SystemBounds const &)
Definition: FastTimerService.cc:932
FastTimerService::Measurement::deallocated
uint64_t deallocated
Definition: FastTimerService.h:206
FastTimerService::preGlobalEndRun
void preGlobalEndRun(edm::GlobalContext const &)
Definition: FastTimerService.cc:1063
FastTimerService::PlotsPerPath::fill
void fill(ProcessCallGraph::PathType const &, ResourcesPerJob const &, ResourcesPerPath const &, unsigned int lumisection)
Definition: FastTimerService.cc:604
HLTPathStatus.h
edm::ModuleDescription
Definition: ModuleDescription.h:21
FastTimerService::on_scheduler_entry
void on_scheduler_entry(bool worker) final
Definition: FastTimerService.cc:1637
FastTimerService::Resources::time_thread
boost::chrono::nanoseconds time_thread
Definition: FastTimerService.h:228
FastTimerService::printSummaryHeader
void printSummaryHeader(T &out, std::string const &label, bool detailed) const
FastTimerService::GroupOfModules
Definition: FastTimerService.h:210
FastTimerService::print_run_summary_
const bool print_run_summary_
Definition: FastTimerService.h:478
FastTimerService::postGlobalBeginLumi
void postGlobalBeginLumi(edm::GlobalContext const &)
Definition: FastTimerService.cc:1031
ModuleDescription.h
ActivityRegistry.h
FastTimerService::postModuleGlobalBeginRun
void postModuleGlobalBeginRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1569
FastTimerService::ignoredSignal
void ignoredSignal(const std::string &signal) const
Definition: FastTimerService.cc:877
FastTimerService::highlight_modules_
std::vector< GroupOfModules > highlight_modules_
Definition: FastTimerService.h:503
FastTimerService::ResourcesPerModule::operator+=
ResourcesPerModule & operator+=(ResourcesPerModule const &other)
Definition: FastTimerService.cc:185
FastTimerService::postGlobalEndRun
void postGlobalEndRun(edm::GlobalContext const &)
Definition: FastTimerService.cc:1065
FastTimerService::dqm_path_ranges_
const PlotRanges dqm_path_ranges_
Definition: FastTimerService.h:497
FastTimerService::ResourcesPerProcess::operator+=
ResourcesPerProcess & operator+=(ResourcesPerProcess const &other)
Definition: FastTimerService.cc:235
ProcessCallGraph::ProcessType
Definition: ProcessCallGraph.h:78
FastTimerService::lumi_transition_
std::vector< AtomicResources > lumi_transition_
Definition: FastTimerService.h:449
FastTimerService::AtomicResources::reset
void reset()
Definition: FastTimerService.cc:134
FastTimerService::postModuleGlobalEndLumi
void postModuleGlobalEndLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1596
RPCNoise_example.check
check
Definition: RPCNoise_example.py:71
FastTimerService::Resources::time_real
boost::chrono::nanoseconds time_real
Definition: FastTimerService.h:229
FastTimerService::postModuleStreamEndLumi
void postModuleStreamEndLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1632
FastTimerService::preModuleEventPrefetching
void preModuleEventPrefetching(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1549
FastTimerService::PlotsPerJob::event_ex_
PlotsPerElement event_ex_
Definition: FastTimerService.h:426
FastTimerService::Resources
Definition: FastTimerService.h:217
edm::LuminosityBlockIndex
Definition: LuminosityBlockIndex.h:33
FastTimerService::preStreamBeginLumi
void preStreamBeginLumi(edm::StreamContext const &)
Definition: FastTimerService.cc:1055
edm::StreamContext
Definition: StreamContext.h:31
FastTimerService::postModuleGlobalEndRun
void postModuleGlobalEndRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1578
FastTimerService::ResourcesPerJob::event
Resources event
Definition: FastTimerService.h:308
FastTimerService::enable_dqm_byls_
const bool enable_dqm_byls_
Definition: FastTimerService.h:492
FastTimerService::PlotsPerJob::lumi_
PlotsPerElement lumi_
Definition: FastTimerService.h:429
FastTimerService::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: FastTimerService.cc:1650
Service.h
FastTimerService::ResourcesPerPath::total
Resources total
Definition: FastTimerService.h:279
FastTimerService::preModuleGlobalBeginLumi
void preModuleGlobalBeginLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1583
FastTimerService::preStreamBeginRun
void preStreamBeginRun(edm::StreamContext const &)
Definition: FastTimerService.cc:930
FastTimerService::postModuleStreamBeginRun
void postModuleStreamBeginRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1605
FastTimerService::ResourcesPerProcess::reset
void reset()
Definition: FastTimerService.cc:227
EventID.h
FastTimerService::ResourcesPerJob::overhead
AtomicResources overhead
Definition: FastTimerService.h:307
FastTimerService::isFirstSubprocess
bool isFirstSubprocess(edm::StreamContext const &)
edm::ActivityRegistry
Definition: ActivityRegistry.h:132
FastTimerService::ResourcesPerProcess::total
Resources total
Definition: FastTimerService.h:292
FastTimerService::Resources::allocated
uint64_t allocated
Definition: FastTimerService.h:230
FastTimerService::preModuleStreamEndRun
void preModuleStreamEndRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1610
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
FastTimerService::PlotsPerElement::fill_fraction
void fill_fraction(Resources const &, Resources const &, unsigned int lumisection)
Definition: FastTimerService.cc:515
FastTimerService::ResourcesPerPath
Definition: FastTimerService.h:271
trackingPlots.other
other
Definition: trackingPlots.py:1465
FastTimerService::plots_
std::unique_ptr< PlotsPerJob > plots_
Definition: FastTimerService.h:446
FastTimerService::Measurement::allocated
uint64_t allocated
Definition: FastTimerService.h:205
FastTimerService::printSummaryLine
void printSummaryLine(T &out, Resources const &data, uint64_t events, std::string const &label) const
FastTimerService::PlotsPerElement::PlotsPerElement
PlotsPerElement()=default
mutex
static boost::mutex mutex
Definition: Proxy.cc:9
FastTimerService::PlotsPerProcess::fill
void fill(ProcessCallGraph::ProcessType const &, ResourcesPerJob const &, ResourcesPerProcess const &, unsigned int ls)
Definition: FastTimerService.cc:658
FastTimerService::AtomicResources::operator+
AtomicResources operator+(AtomicResources const &other) const
Definition: FastTimerService.cc:165
FastTimerService::printEventHeader
void printEventHeader(T &out, std::string const &label) const
FastTimerService::Resources::operator+
Resources operator+(Resources const &other) const
Definition: FastTimerService.cc:108
FastTimerService::PlotsPerPath::module_deallocated_total_
dqm::reco::MonitorElement * module_deallocated_total_
Definition: FastTimerService.h:381
FastTimerService::ResourcesPerJob::processes
std::vector< ResourcesPerProcess > processes
Definition: FastTimerService.h:312
FastTimerService::unsupported_signals_
tbb::concurrent_unordered_set< std::string > unsupported_signals_
Definition: FastTimerService.h:506
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
FastTimerService::threads_
tbb::enumerable_thread_specific< Measurement, tbb::cache_aligned_allocator< Measurement >, tbb::ets_key_per_instance > threads_
Definition: FastTimerService.h:460
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FastTimerService::PlotsPerJob
Definition: FastTimerService.h:405
FastTimerService::PlotsPerPath::module_allocated_total_
dqm::reco::MonitorElement * module_allocated_total_
Definition: FastTimerService.h:380
FastTimerService::PlotsPerProcess
Definition: FastTimerService.h:384
FastTimerService::PlotsPerElement::time_real_
dqm::reco::MonitorElement * time_real_
Definition: FastTimerService.h:342
FastTimerService::Measurement::Measurement
Measurement() noexcept
Definition: FastTimerService.cc:304
FastTimerService::PlotsPerElement::deallocated_
dqm::reco::MonitorElement * deallocated_
Definition: FastTimerService.h:346
FastTimerService::~FastTimerService
~FastTimerService() override=default
FastTimerService::preModuleStreamEndLumi
void preModuleStreamEndLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1628
FastTimerService::ResourcesPerPath::operator+
ResourcesPerPath operator+(ResourcesPerPath const &other) const
Definition: FastTimerService.cc:216
FastTimerService::PlotsPerJob::overhead_
PlotsPerElement overhead_
Definition: FastTimerService.h:427
FastTimerService::PlotsPerJob::processes_
std::vector< PlotsPerProcess > processes_
Definition: FastTimerService.h:436
ProcessCallGraph
Definition: ProcessCallGraph.h:27
FastTimerService::postModuleEventAcquire
void postModuleEventAcquire(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1509
edm::GlobalContext
Definition: GlobalContext.h:29
edm::service::SystemBounds
Definition: SystemBounds.h:29
edm::ParameterSet
Definition: ParameterSet.h:36
FastTimerService::summary_mutex_
std::mutex summary_mutex_
Definition: FastTimerService.h:456
FastTimerService::write_json_summary_
const bool write_json_summary_
Definition: FastTimerService.h:485
GlobalContext.h
Timestamp.h
FastTimerService::preModuleGlobalEndRun
void preModuleGlobalEndRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1574
edm::PathContext
Definition: PathContext.h:24
FastTimerService::postModuleEventPrefetching
void postModuleEventPrefetching(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1553
LaserDQM_cfg.process
process
Definition: LaserDQM_cfg.py:3
FastTimerService::PlotsPerElement::book
void book(dqm::reco::DQMStore::IBooker &, std::string const &name, std::string const &title, PlotRanges const &ranges, unsigned int lumisections, bool byls)
Definition: FastTimerService.cc:372
FastTimerService::PlotsPerElement
Definition: FastTimerService.h:325
FastTimerService::PlotsPerProcess::endpaths_
std::vector< PlotsPerPath > endpaths_
Definition: FastTimerService.h:402
FastTimerService::dqm_lumisections_range_
const unsigned int dqm_lumisections_range_
Definition: FastTimerService.h:499
edm::HLTPathStatus
Definition: HLTPathStatus.h:33
FastTimerService::postModuleStreamBeginLumi
void postModuleStreamBeginLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1623
FastTimerService::Measurement::measure_and_store
void measure_and_store(Resources &store) noexcept
Definition: FastTimerService.cc:316
FastTimerService::ResourcesPerJob::total
Resources total
Definition: FastTimerService.h:306
FastTimerService::ResourcesPerJob::operator+
ResourcesPerJob operator+(ResourcesPerJob const &other) const
Definition: FastTimerService.cc:294
FastTimerService::PlotsPerElement::allocated_
dqm::reco::MonitorElement * allocated_
Definition: FastTimerService.h:344
FastTimerService::PlotsPerElement::time_real_byls_
dqm::reco::MonitorElement * time_real_byls_
Definition: FastTimerService.h:343
FastTimerService::Measurement::measure_and_accumulate
void measure_and_accumulate(Resources &store) noexcept
Definition: FastTimerService.cc:334
FastTimerService::preStreamEndRun
void preStreamEndRun(edm::StreamContext const &)
Definition: FastTimerService.cc:1016
FastTimerService::preModuleGlobalEndLumi
void preModuleGlobalEndLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1592
FastTimerService
Definition: FastTimerService.h:53
FastTimerService::PlotsPerJob::PlotsPerJob
PlotsPerJob(ProcessCallGraph const &job, std::vector< GroupOfModules > const &groups)
Definition: FastTimerService.cc:674
FastTimerService::PlotsPerJob::fill
void fill(ProcessCallGraph const &, ResourcesPerJob const &, unsigned int ls)
Definition: FastTimerService.cc:731
FastTimerService::PlotsPerJob::event_
PlotsPerElement event_
Definition: FastTimerService.h:425
FastTimerService::postModuleGlobalBeginLumi
void postModuleGlobalBeginLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1587
FastTimerService::PlotsPerJob::run_
PlotsPerElement run_
Definition: FastTimerService.h:430
FastTimerService::Resources::Resources
Resources()
Definition: FastTimerService.cc:79
FastTimerService::PlotRanges::memory_resolution
double memory_resolution
Definition: FastTimerService.h:321
module
Definition: vlib.h:198
PathContext.h
FastTimerService::Measurement::time_real
boost::chrono::high_resolution_clock::time_point time_real
Definition: FastTimerService.h:204
FastTimerService::PlotsPerPath::book
void book(dqm::reco::DQMStore::IBooker &, std::string const &, ProcessCallGraph const &, ProcessCallGraph::PathType const &, PlotRanges const &ranges, unsigned int lumisections, bool byls)
Definition: FastTimerService.cc:557
FastTimerService::postStreamEndLumi
void postStreamEndLumi(edm::StreamContext const &)
Definition: FastTimerService.cc:1061
FastTimerService::PlotsPerPath::total_
PlotsPerElement total_
Definition: FastTimerService.h:368
FastTimerService::ResourcesPerModule::total
Resources total
Definition: FastTimerService.h:266
FastTimerService::Resources::deallocated
uint64_t deallocated
Definition: FastTimerService.h:231
FastTimerService::printPathSummaryLine
void printPathSummaryLine(T &out, Resources const &data, Resources const &total, uint64_t events, std::string const &label) const
FastTimerService::ResourcesPerProcess::ResourcesPerProcess
ResourcesPerProcess(ProcessCallGraph::ProcessType const &process)
Definition: FastTimerService.cc:224
FastTimerService::AtomicResources::AtomicResources
AtomicResources()
Definition: FastTimerService.cc:125
FastTimerService::subprocess_event_check_
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_event_check_
Definition: FastTimerService.h:463
overlapproblemtsosanalyzer_cfi.title
title
Definition: overlapproblemtsosanalyzer_cfi.py:7
FastTimerService::preEventReadFromSource
void preEventReadFromSource(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1557
FastTimerService::Resources::operator+=
Resources & operator+=(Resources const &other)
Definition: FastTimerService.cc:92
FastTimerService::preModuleStreamBeginRun
void preModuleStreamBeginRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1601
FastTimerService::thread
Measurement & thread()
Definition: FastTimerService.cc:1647
FastTimerService::PlotsPerPath::module_time_real_total_
dqm::reco::MonitorElement * module_time_real_total_
Definition: FastTimerService.h:379
type
type
Definition: HCALResponse.h:21
FastTimerService::PlotsPerPath::module_time_thread_total_
dqm::reco::MonitorElement * module_time_thread_total_
Definition: FastTimerService.h:378
FastTimerService::Measurement
Definition: FastTimerService.h:188
json
nlohmann::json json
Definition: FastTimerService.h:25
FastTimerService::ResourcesPerJob
Definition: FastTimerService.h:297
FastTimerService::ResourcesPerPath::last
unsigned last
Definition: FastTimerService.h:280
FastTimerService::PlotsPerJob::fill_lumi
void fill_lumi(AtomicResources const &, unsigned int lumisection)
Definition: FastTimerService.cc:754
ProcessCallGraph.h
FastTimerService::PlotsPerPath::module_counter_
dqm::reco::MonitorElement * module_counter_
Definition: FastTimerService.h:376
FastTimerService::AtomicResources::operator=
AtomicResources & operator=(AtomicResources const &other)
Definition: FastTimerService.cc:141
FastTimerService::ResourcesPerModule::events
unsigned events
Definition: FastTimerService.h:267
FastTimerService::PlotRanges::time_range
double time_range
Definition: FastTimerService.h:318
FastTimerService::prePathEvent
void prePathEvent(edm::StreamContext const &, edm::PathContext const &)
Definition: FastTimerService.cc:1469
FastTimerService::postPathEvent
void postPathEvent(edm::StreamContext const &, edm::PathContext const &, edm::HLTPathStatus const &)
Definition: FastTimerService.cc:1479
edm::PathsAndConsumesOfModulesBase
Definition: PathsAndConsumesOfModulesBase.h:34
FastTimerService::postGlobalEndLumi
void postGlobalEndLumi(edm::GlobalContext const &)
Definition: FastTimerService.cc:1035
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
T
long double T
Definition: Basic3DVectorLD.h:48
FastTimerService::AtomicResources::operator+=
AtomicResources & operator+=(AtomicResources const &other)
Definition: FastTimerService.cc:149
FastTimerService::PlotsPerJob::book
void book(dqm::reco::DQMStore::IBooker &, ProcessCallGraph const &, std::vector< GroupOfModules > const &, PlotRanges const &event_ranges, PlotRanges const &path_ranges, PlotRanges const &module_ranges, unsigned int lumisections, bool bymodule, bool bypath, bool byls, bool transitions)
Definition: FastTimerService.cc:681
FastTimerService::preModuleEventDelayedGet
void preModuleEventDelayedGet(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1541
ProcessCallGraph::PathType
Definition: ProcessCallGraph.h:50
FastTimerService::PlotsPerProcess::event_
PlotsPerElement event_
Definition: FastTimerService.h:399
FastTimerService::preStreamEndLumi
void preStreamEndLumi(edm::StreamContext const &)
Definition: FastTimerService.cc:1059
FastTimerService::preGlobalEndLumi
void preGlobalEndLumi(edm::GlobalContext const &)
Definition: FastTimerService.cc:1033
FastTimerService::PlotsPerElement::allocated_byls_
dqm::reco::MonitorElement * allocated_byls_
Definition: FastTimerService.h:345
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
FastTimerService::postModuleEventDelayedGet
void postModuleEventDelayedGet(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1545
FastTimerService::postStreamBeginRun
void postStreamBeginRun(edm::StreamContext const &)
Definition: FastTimerService.cc:1014
FastTimerService::Resources::reset
void reset()
Definition: FastTimerService.cc:85
edm::RunIndex
Definition: RunIndex.h:32
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
dqm::implementation::IBooker
Definition: DQMStore.h:43
dqmMemoryStats.total
total
Definition: dqmMemoryStats.py:152
FastTimerService::printHeader
void printHeader(T &out, std::string const &label) const
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
FastTimerService::PlotsPerElement::fill
void fill(Resources const &, unsigned int lumisection)
Definition: FastTimerService.cc:457
FastTimerService::ResourcesPerProcess::operator+
ResourcesPerProcess operator+(ResourcesPerProcess const &other) const
Definition: FastTimerService.cc:247
FastTimerService::printSummary
void printSummary(T &out, ResourcesPerJob const &data, std::string const &label) const
FastTimerService::postGlobalBeginRun
void postGlobalBeginRun(edm::GlobalContext const &)
Definition: FastTimerService.cc:928
FastTimerService::postSourceRun
void postSourceRun(edm::RunIndex)
Definition: FastTimerService.cc:1088
ParameterSet.h
StreamContext.h
FastTimerService::PlotsPerProcess::paths_
std::vector< PlotsPerPath > paths_
Definition: FastTimerService.h:401
FastTimerService::printEventLine
void printEventLine(T &out, Resources const &data, std::string const &label) const
ProcessContext.h
FastTimerService::PlotsPerElement::deallocated_byls_
dqm::reco::MonitorElement * deallocated_byls_
Definition: FastTimerService.h:347
json
nlohmann::json json
Definition: FastTimerService.cc:19
FastTimerService::run_transition_
std::vector< AtomicResources > run_transition_
Definition: FastTimerService.h:450
FastTimerService::PlotsPerJob::highlight_
std::vector< PlotsPerElement > highlight_
Definition: FastTimerService.h:432
SystemBounds.h
FastTimerService::PlotRanges::time_resolution
double time_resolution
Definition: FastTimerService.h:319
label
const char * label
Definition: PFTauDecayModeTools.cc:11
FastTimerService::ResourcesPerJob::events
unsigned events
Definition: FastTimerService.h:313
FastTimerService::ResourcesPerModule::has_acquire
bool has_acquire
Definition: FastTimerService.h:268
FastTimerService::preSourceRun
void preSourceRun(edm::RunIndex)
Definition: FastTimerService.cc:1086
FastTimerService::print_event_summary_
const bool print_event_summary_
Definition: FastTimerService.h:477
FastTimerService::enable_dqm_bymodule_
const bool enable_dqm_bymodule_
Definition: FastTimerService.h:490
FastTimerService::postStreamEndRun
void postStreamEndRun(edm::StreamContext const &)
Definition: FastTimerService.cc:1018
FastTimerService::preEvent
void preEvent(edm::StreamContext const &)
Definition: FastTimerService.cc:1395
FastTimerService::postEventReadFromSource
void postEventReadFromSource(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: FastTimerService.cc:1561
FastTimerService::printPathSummaryHeader
void printPathSummaryHeader(T &out, std::string const &label) const
FastTimerService::Measurement::time_thread
boost::chrono::thread_clock::time_point time_thread
Definition: FastTimerService.h:203
FastTimerService::PlotsPerPath::PlotsPerPath
PlotsPerPath()=default
FastTimerService::postBeginJob
void postBeginJob()
Definition: FastTimerService.cc:975
edm::ModuleCallingContext
Definition: ModuleCallingContext.h:29
FastTimerService::ResourcesPerPath::operator+=
ResourcesPerPath & operator+=(ResourcesPerPath const &other)
Definition: FastTimerService.cc:208