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 358 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 563 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, callgraph::module, castor_dqm_sourceclient_file_cfg::path, dqm::implementation::NavigatorBase::pwd(), diffTwoXMLs::ranges, dqm::implementation::NavigatorBase::setCurrentFolder(), dqm::impl::MonitorElement::setYTitle(), and AlCaHLTBitMon_QueryRunRegistry::string.

569  {
570  const std::string basedir = booker.pwd();
571  std::string folderName = basedir + "/" + prefixDir + path.name_;
574 
575  total_.book(booker, "path", path.name_, ranges, lumisections, byls);
576 
577  // MonitorElement::setStatOverflows(kTRUE) includes underflows and overflows in the computation of mean and RMS
578  unsigned int bins = path.modules_and_dependencies_.size();
579  module_counter_ = booker.book1DD("module_counter", "module counter", bins + 1, -0.5, bins + 0.5);
580  module_counter_->setYTitle("events");
583  booker.book1DD("module_time_thread_total", "total module time (cpu)", bins, -0.5, bins - 0.5);
584  module_time_thread_total_->setYTitle("processing time [ms]");
587  booker.book1DD("module_time_real_total", "total module time (real)", bins, -0.5, bins - 0.5);
588  module_time_real_total_->setYTitle("processing time [ms]");
592  booker.book1DD("module_allocated_total", "total allocated memory", bins, -0.5, bins - 0.5);
593  module_allocated_total_->setYTitle("memory [kB]");
596  booker.book1DD("module_deallocated_total", "total deallocated memory", bins, -0.5, bins - 0.5);
597  module_deallocated_total_->setYTitle("memory [kB]");
599  }
600  for (unsigned int bin : boost::irange(0u, bins)) {
601  auto const& module = job[path.modules_and_dependencies_[bin]];
602  std::string const& label =
603  module.scheduled_ ? module.module_.moduleLabel() : module.module_.moduleLabel() + " (unscheduled)";
610  }
611  }
612  module_counter_->setBinLabel(bins + 1, "");
613 
614  booker.setCurrentFolder(basedir);
615 }
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 617 of file FastTimerService.cc.

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

620  {
621  // fill the total path time
622  total_.fill(path.total, ls);
623 
624  // fill the modules that actually ran and the total time spent in each od them
625  for (unsigned int i = 0; i < path.last; ++i) {
626  auto const& module = data.modules[description.modules_and_dependencies_[i]];
627  if (module_counter_)
629 
631  module_time_thread_total_->Fill(i, ms(module.total.time_thread));
632 
634  module_time_real_total_->Fill(i, ms(module.total.time_real));
635 
637  module_allocated_total_->Fill(i, kB(module.total.allocated));
638 
640  module_deallocated_total_->Fill(i, kB(module.total.deallocated));
641  }
642  if (module_counter_ and path.status)
643  module_counter_->Fill(path.last);
644 }
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:79
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 387 of file FastTimerService.h.

◆ module_counter_

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

Definition at line 383 of file FastTimerService.h.

◆ module_deallocated_total_

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

Definition at line 388 of file FastTimerService.h.

◆ module_time_real_total_

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

Definition at line 386 of file FastTimerService.h.

◆ module_time_thread_total_

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

Definition at line 385 of file FastTimerService.h.

◆ total_

PlotsPerElement FastTimerService::PlotsPerPath::total_
private

Definition at line 375 of file FastTimerService.h.