CMS 3D CMS Logo

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

Public Member Functions

void book (DQMStore::IBooker &, 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 347 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,
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_.

513 {
514  const std::string basedir = booker.pwd();
515  booker.setCurrentFolder(basedir + "/path " + path.name_);
516 
517  total_.book(booker, "path", path.name_, ranges, lumisections, byls);
518 
519  unsigned int bins = path.modules_and_dependencies_.size();
520  module_counter_ = booker.book1DD(
521  "module_counter",
522  "module counter",
523  bins + 1, -0.5, bins + 0.5
524  )->getTH1D();
525  module_counter_->SetYTitle("events");
527  "module_time_thread_total",
528  "total module time (cpu)",
529  bins, -0.5, bins - 0.5
530  )->getTH1D();
531  module_time_thread_total_->SetYTitle("processing time [ms]");
533  "module_time_real_total",
534  "total module time (real)",
535  bins, -0.5, bins - 0.5
536  )->getTH1D();
537  module_time_real_total_->SetYTitle("processing time [ms]");
539  {
541  "module_allocated_total",
542  "total allocated memory",
543  bins, -0.5, bins - 0.5
544  )->getTH1D();
545  module_allocated_total_->SetYTitle("memory [kB]");
547  "module_deallocated_total",
548  "total deallocated memory",
549  bins, -0.5, bins - 0.5
550  )->getTH1D();
551  module_deallocated_total_->SetYTitle("memory [kB]");
552  }
553  for (unsigned int bin: boost::irange(0u, bins)) {
554  auto const& module = job[path.modules_and_dependencies_[bin]];
555  std::string const& label = module.scheduled_ ? module.module_.moduleLabel() : module.module_.moduleLabel() + " (unscheduled)";
556  module_counter_ ->GetXaxis()->SetBinLabel(bin + 1, label.c_str());
557  module_time_thread_total_->GetXaxis()->SetBinLabel(bin + 1, label.c_str());
558  module_time_real_total_ ->GetXaxis()->SetBinLabel(bin + 1, label.c_str());
560  {
561  module_allocated_total_ ->GetXaxis()->SetBinLabel(bin + 1, label.c_str());
562  module_deallocated_total_->GetXaxis()->SetBinLabel(bin + 1, label.c_str());
563  }
564  }
565  module_counter_->GetXaxis()->SetBinLabel(bins + 1, "");
566 
567  booker.setCurrentFolder(basedir);
568 }
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 571 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_.

572 {
573  // fill the total path time
574  total_.fill(path.total, ls);
575 
576  // fill the modules that actually ran and the total time spent in each od them
577  for (unsigned int i = 0; i < path.last; ++i) {
578  auto const& module = data.modules[description.modules_and_dependencies_[i]];
579  if (module_counter_)
580  module_counter_->Fill(i);
581 
583  module_time_thread_total_->Fill(i, ms(module.total.time_thread));
584 
586  module_time_real_total_->Fill(i, ms(module.total.time_real));
587 
589  module_allocated_total_->Fill(i, kB(module.total.allocated));
590 
592  module_deallocated_total_->Fill(i, kB(module.total.deallocated));
593  }
594  if (module_counter_ and path.status)
595  module_counter_->Fill(path.last);
596 }
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 368 of file FastTimerService.h.

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

TH1D* FastTimerService::PlotsPerPath::module_counter_
private

Definition at line 364 of file FastTimerService.h.

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

TH1D* FastTimerService::PlotsPerPath::module_deallocated_total_
private

Definition at line 369 of file FastTimerService.h.

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

TH1D* FastTimerService::PlotsPerPath::module_time_real_total_
private

Definition at line 367 of file FastTimerService.h.

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

TH1D* FastTimerService::PlotsPerPath::module_time_thread_total_
private

Definition at line 366 of file FastTimerService.h.

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

PlotsPerElement FastTimerService::PlotsPerPath::total_
private

Definition at line 356 of file FastTimerService.h.

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