CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
FastTimerService::PlotsPerPath Class Reference

Public Member Functions

void book (dqm::reco::DQMStore::IBooker &, std::string const &, ProcessCallGraph const &, ProcessCallGraph::PathType const &, PlotRanges const &ranges, unsigned int lumisections, bool byls)
 
void fill (ProcessCallGraph::PathType const &, ResourcesPerJob const &, ResourcesPerPath const &, unsigned int lumisection)
 
 PlotsPerPath ()=default
 

Private Attributes

dqm::reco::MonitorElementmodule_allocated_total_ = nullptr
 
dqm::reco::MonitorElementmodule_counter_ = nullptr
 
dqm::reco::MonitorElementmodule_deallocated_total_ = nullptr
 
dqm::reco::MonitorElementmodule_time_real_total_ = nullptr
 
dqm::reco::MonitorElementmodule_time_thread_total_ = nullptr
 
PlotsPerElement total_
 

Detailed Description

Definition at line 359 of file FastTimerService.h.

Constructor & Destructor Documentation

◆ PlotsPerPath()

FastTimerService::PlotsPerPath::PlotsPerPath ( )
default

Member Function Documentation

◆ book()

void FastTimerService::PlotsPerPath::book ( dqm::reco::DQMStore::IBooker booker,
std::string const &  prefixDir,
ProcessCallGraph const &  job,
ProcessCallGraph::PathType const &  path,
PlotRanges const &  ranges,
unsigned int  lumisections,
bool  byls 
)

Definition at line 565 of file FastTimerService.cc.

References makeHippyCampaign::basedir, newFWLiteAna::bin, trigObjTnPSource_cfi::bins, dqm::implementation::IBooker::book1DD(), FastTimerService::fixForDQM(), ALCARECODTCalibSynchCosmicsDQM_cff::folderName, memory_usage::is_available(), label, castor_dqm_sourceclient_file_cfg::path, dqm::implementation::NavigatorBase::pwd(), diffTwoXMLs::ranges, dqm::implementation::NavigatorBase::setCurrentFolder(), dqm::impl::MonitorElement::setYTitle(), and AlCaHLTBitMon_QueryRunRegistry::string.

571  {
572  const std::string basedir = booker.pwd();
573  std::string folderName = basedir + "/" + prefixDir + path.name_;
576 
577  total_.book(booker, "path", path.name_, ranges, lumisections, byls);
578 
579  // MonitorElement::setStatOverflows(kTRUE) includes underflows and overflows in the computation of mean and RMS
580  unsigned int bins = path.modules_and_dependencies_.size();
581  module_counter_ = booker.book1DD("module_counter", "module counter", bins + 1, -0.5, bins + 0.5);
582  module_counter_->setYTitle("events");
585  booker.book1DD("module_time_thread_total", "total module time (cpu)", bins, -0.5, bins - 0.5);
586  module_time_thread_total_->setYTitle("processing time [ms]");
589  booker.book1DD("module_time_real_total", "total module time (real)", bins, -0.5, bins - 0.5);
590  module_time_real_total_->setYTitle("processing time [ms]");
594  booker.book1DD("module_allocated_total", "total allocated memory", bins, -0.5, bins - 0.5);
595  module_allocated_total_->setYTitle("memory [kB]");
598  booker.book1DD("module_deallocated_total", "total deallocated memory", bins, -0.5, bins - 0.5);
599  module_deallocated_total_->setYTitle("memory [kB]");
601  }
602  for (unsigned int bin : boost::irange(0u, bins)) {
603  auto const& module = job[path.modules_and_dependencies_[bin]];
604  std::string const& label =
605  module.scheduled_ ? module.module_.moduleLabel() : module.module_.moduleLabel() + " (unscheduled)";
612  }
613  }
614  module_counter_->setBinLabel(bins + 1, "");
615 
616  booker.setCurrentFolder(basedir);
617 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
dqm::reco::MonitorElement * module_deallocated_total_
virtual std::string pwd()
Definition: DQMStore.cc:20
char const * label
MonitorElement * book1DD(TString const &name, TString const &title, int nchX, double lowX, double highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:155
dqm::reco::MonitorElement * module_time_thread_total_
dqm::reco::MonitorElement * module_time_real_total_
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
string ranges
Definition: diffTwoXMLs.py:79
void book(dqm::reco::DQMStore::IBooker &, std::string const &name, std::string const &title, PlotRanges const &ranges, unsigned int lumisections, bool byls)
static bool is_available()
Definition: memory_usage.cc:84
virtual void setYTitle(std::string const &title)
virtual DQM_DEPRECATED void setStatOverflows(bool value)
dqm::reco::MonitorElement * module_allocated_total_
dqm::reco::MonitorElement * module_counter_
static void fixForDQM(std::string &label)

◆ fill()

void FastTimerService::PlotsPerPath::fill ( ProcessCallGraph::PathType const &  description,
ResourcesPerJob const &  data,
ResourcesPerPath const &  path,
unsigned int  lumisection 
)

Definition at line 619 of file FastTimerService.cc.

References data, makeListRunsInFiles::description, mps_fire::i, eostools::ls(), and castor_dqm_sourceclient_file_cfg::path.

622  {
623  // fill the total path time
624  total_.fill(path.total, ls);
625 
626  // fill the modules that actually ran and the total time spent in each od them
627  for (unsigned int i = 0; i < path.last; ++i) {
628  auto const& module = data.modules[description.modules_and_dependencies_[i]];
629  if (module_counter_)
631 
633  module_time_thread_total_->Fill(i, ms(module.total.time_thread));
634 
636  module_time_real_total_->Fill(i, ms(module.total.time_real));
637 
639  module_allocated_total_->Fill(i, kB(module.total.allocated));
640 
642  module_deallocated_total_->Fill(i, kB(module.total.deallocated));
643  }
644  if (module_counter_ and path.status)
645  module_counter_->Fill(path.last);
646 }
void fill(Resources const &, unsigned int lumisection)
dqm::reco::MonitorElement * module_deallocated_total_
void Fill(long long x)
dqm::reco::MonitorElement * module_time_thread_total_
dqm::reco::MonitorElement * module_time_real_total_
def ls(path, rec=False)
Definition: eostools.py:349
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
dqm::reco::MonitorElement * module_allocated_total_
dqm::reco::MonitorElement * module_counter_

Member Data Documentation

◆ module_allocated_total_

dqm::reco::MonitorElement* FastTimerService::PlotsPerPath::module_allocated_total_ = nullptr
private

Definition at line 388 of file FastTimerService.h.

◆ module_counter_

dqm::reco::MonitorElement* FastTimerService::PlotsPerPath::module_counter_ = nullptr
private

Definition at line 384 of file FastTimerService.h.

◆ module_deallocated_total_

dqm::reco::MonitorElement* FastTimerService::PlotsPerPath::module_deallocated_total_ = nullptr
private

Definition at line 389 of file FastTimerService.h.

◆ module_time_real_total_

dqm::reco::MonitorElement* FastTimerService::PlotsPerPath::module_time_real_total_ = nullptr
private

Definition at line 387 of file FastTimerService.h.

◆ module_time_thread_total_

dqm::reco::MonitorElement* FastTimerService::PlotsPerPath::module_time_thread_total_ = nullptr
private

Definition at line 386 of file FastTimerService.h.

◆ total_

PlotsPerElement FastTimerService::PlotsPerPath::total_
private

Definition at line 376 of file FastTimerService.h.