CMS 3D CMS Logo

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

Public Member Functions

void book (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 ()
 
void reset ()
 

Private Attributes

TH1D * module_allocated_total_
 
TH1D * module_counter_
 
TH1D * module_deallocated_total_
 
TH1D * module_time_real_total_
 
TH1D * module_time_thread_total_
 
PlotsPerElement total_
 

Detailed Description

Definition at line 348 of file FastTimerService.h.

Constructor & Destructor Documentation

FastTimerService::PlotsPerPath::PlotsPerPath ( )

Definition at line 483 of file FastTimerService.cc.

Member Function Documentation

void FastTimerService::PlotsPerPath::book ( 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 506 of file FastTimerService.cc.

References stringResolutionProvider_cfi::bin, create_public_pileup_plots::bins, FastTimerService::PlotsPerElement::book(), DQMStore::IBooker::book1DD(), MonitorElement::getTH1D(), memory_usage::is_available(), diffTwoXMLs::label, module_allocated_total_, module_counter_, module_deallocated_total_, module_time_real_total_, module_time_thread_total_, ProcessCallGraph::PathType::modules_and_dependencies_, ProcessCallGraph::PathType::name_, DQMStore::IBooker::pwd(), DQMStore::IBooker::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and total_.

514 {
515  const std::string basedir = booker.pwd();
516  // booker.setCurrentFolder(basedir + "/path " + path.name_);
517  booker.setCurrentFolder(basedir + "/" + prefixDir + path.name_);
518 
519  total_.book(booker, "path", path.name_, ranges, lumisections, byls);
520 
521  unsigned int bins = path.modules_and_dependencies_.size();
522  module_counter_ = booker.book1DD(
523  "module_counter",
524  "module counter",
525  bins + 1, -0.5, bins + 0.5
526  )->getTH1D();
527  module_counter_->SetYTitle("events");
529  "module_time_thread_total",
530  "total module time (cpu)",
531  bins, -0.5, bins - 0.5
532  )->getTH1D();
533  module_time_thread_total_->SetYTitle("processing time [ms]");
535  "module_time_real_total",
536  "total module time (real)",
537  bins, -0.5, bins - 0.5
538  )->getTH1D();
539  module_time_real_total_->SetYTitle("processing time [ms]");
541  {
543  "module_allocated_total",
544  "total allocated memory",
545  bins, -0.5, bins - 0.5
546  )->getTH1D();
547  module_allocated_total_->SetYTitle("memory [kB]");
549  "module_deallocated_total",
550  "total deallocated memory",
551  bins, -0.5, bins - 0.5
552  )->getTH1D();
553  module_deallocated_total_->SetYTitle("memory [kB]");
554  }
555  for (unsigned int bin: boost::irange(0u, bins)) {
556  auto const& module = job[path.modules_and_dependencies_[bin]];
557  std::string const& label = module.scheduled_ ? module.module_.moduleLabel() : module.module_.moduleLabel() + " (unscheduled)";
558  module_counter_ ->GetXaxis()->SetBinLabel(bin + 1, label.c_str());
559  module_time_thread_total_->GetXaxis()->SetBinLabel(bin + 1, label.c_str());
560  module_time_real_total_ ->GetXaxis()->SetBinLabel(bin + 1, label.c_str());
562  {
563  module_allocated_total_ ->GetXaxis()->SetBinLabel(bin + 1, label.c_str());
564  module_deallocated_total_->GetXaxis()->SetBinLabel(bin + 1, label.c_str());
565  }
566  }
567  module_counter_->GetXaxis()->SetBinLabel(bins + 1, "");
568 
569  booker.setCurrentFolder(basedir);
570 }
const std::string & pwd(void)
Definition: DQMStore.cc:285
TH1D * getTH1D(void) const
bin
set the eta bin as selection string.
string ranges
Definition: diffTwoXMLs.py:78
static bool is_available()
Definition: memory_usage.cc:65
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
void book(DQMStore::IBooker &, std::string const &name, std::string const &title, PlotRanges const &ranges, unsigned int lumisections, bool byls)
MonitorElement * book1DD(Args &&...args)
Definition: DQMStore.h:127
Definition: vlib.h:208
void FastTimerService::PlotsPerPath::fill ( ProcessCallGraph::PathType const &  description,
ResourcesPerJob const &  data,
ResourcesPerPath const &  path,
unsigned int  lumisection 
)

Definition at line 573 of file FastTimerService.cc.

References FastTimerService::PlotsPerElement::fill(), mps_fire::i, FastTimerService::ResourcesPerPath::last, module_allocated_total_, module_counter_, module_deallocated_total_, module_time_real_total_, module_time_thread_total_, FastTimerService::ResourcesPerJob::modules, ProcessCallGraph::PathType::modules_and_dependencies_, AnalysisDataFormats_SUSYBSMObjects::ms, FastTimerService::ResourcesPerPath::status, FastTimerService::ResourcesPerPath::total, and total_.

574 {
575  // fill the total path time
576  total_.fill(path.total, ls);
577 
578  // fill the modules that actually ran and the total time spent in each od them
579  for (unsigned int i = 0; i < path.last; ++i) {
580  auto const& module = data.modules[description.modules_and_dependencies_[i]];
581  if (module_counter_)
582  module_counter_->Fill(i);
583 
585  module_time_thread_total_->Fill(i, ms(module.total.time_thread));
586 
588  module_time_real_total_->Fill(i, ms(module.total.time_real));
589 
591  module_allocated_total_->Fill(i, kB(module.total.allocated));
592 
594  module_deallocated_total_->Fill(i, kB(module.total.deallocated));
595  }
596  if (module_counter_ and path.status)
597  module_counter_->Fill(path.last);
598 }
void fill(Resources const &, unsigned int lumisection)
def ls(path, rec=False)
Definition: eostools.py:348
susybsm::MuonSegment ms
Definition: classes.h:31
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
Definition: vlib.h:208
void FastTimerService::PlotsPerPath::reset ( void  )

Member Data Documentation

TH1D* FastTimerService::PlotsPerPath::module_allocated_total_
private

Definition at line 369 of file FastTimerService.h.

Referenced by book(), fill(), and reset().

TH1D* FastTimerService::PlotsPerPath::module_counter_
private

Definition at line 365 of file FastTimerService.h.

Referenced by book(), fill(), and reset().

TH1D* FastTimerService::PlotsPerPath::module_deallocated_total_
private

Definition at line 370 of file FastTimerService.h.

Referenced by book(), fill(), and reset().

TH1D* FastTimerService::PlotsPerPath::module_time_real_total_
private

Definition at line 368 of file FastTimerService.h.

Referenced by book(), fill(), and reset().

TH1D* FastTimerService::PlotsPerPath::module_time_thread_total_
private

Definition at line 367 of file FastTimerService.h.

Referenced by book(), fill(), and reset().

PlotsPerElement FastTimerService::PlotsPerPath::total_
private

Definition at line 357 of file FastTimerService.h.

Referenced by book(), fill(), and reset().