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 374 of file FastTimerService.h.

Constructor & Destructor Documentation

FastTimerService::PlotsPerPath::PlotsPerPath ( )

Definition at line 589 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 612 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_.

620 {
621  const std::string basedir = booker.pwd();
622  // booker.setCurrentFolder(basedir + "/path " + path.name_);
623  booker.setCurrentFolder(basedir + "/" + prefixDir + path.name_);
624 
625  total_.book(booker, "path", path.name_, ranges, lumisections, byls);
626 
627  unsigned int bins = path.modules_and_dependencies_.size();
628  module_counter_ = booker.book1DD(
629  "module_counter",
630  "module counter",
631  bins + 1, -0.5, bins + 0.5
632  )->getTH1D();
633  module_counter_->SetYTitle("events");
635  "module_time_thread_total",
636  "total module time (cpu)",
637  bins, -0.5, bins - 0.5
638  )->getTH1D();
639  module_time_thread_total_->SetYTitle("processing time [ms]");
641  "module_time_real_total",
642  "total module time (real)",
643  bins, -0.5, bins - 0.5
644  )->getTH1D();
645  module_time_real_total_->SetYTitle("processing time [ms]");
647  {
649  "module_allocated_total",
650  "total allocated memory",
651  bins, -0.5, bins - 0.5
652  )->getTH1D();
653  module_allocated_total_->SetYTitle("memory [kB]");
655  "module_deallocated_total",
656  "total deallocated memory",
657  bins, -0.5, bins - 0.5
658  )->getTH1D();
659  module_deallocated_total_->SetYTitle("memory [kB]");
660  }
661  for (unsigned int bin: boost::irange(0u, bins)) {
662  auto const& module = job[path.modules_and_dependencies_[bin]];
663  std::string const& label = module.scheduled_ ? module.module_.moduleLabel() : module.module_.moduleLabel() + " (unscheduled)";
664  module_counter_ ->GetXaxis()->SetBinLabel(bin + 1, label.c_str());
665  module_time_thread_total_->GetXaxis()->SetBinLabel(bin + 1, label.c_str());
666  module_time_real_total_ ->GetXaxis()->SetBinLabel(bin + 1, label.c_str());
668  {
669  module_allocated_total_ ->GetXaxis()->SetBinLabel(bin + 1, label.c_str());
670  module_deallocated_total_->GetXaxis()->SetBinLabel(bin + 1, label.c_str());
671  }
672  }
673  module_counter_->GetXaxis()->SetBinLabel(bins + 1, "");
674 
675  booker.setCurrentFolder(basedir);
676 }
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 679 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_.

680 {
681  // fill the total path time
682  total_.fill(path.total, ls);
683 
684  // fill the modules that actually ran and the total time spent in each od them
685  for (unsigned int i = 0; i < path.last; ++i) {
686  auto const& module = data.modules[description.modules_and_dependencies_[i]];
687  if (module_counter_)
688  module_counter_->Fill(i);
689 
691  module_time_thread_total_->Fill(i, ms(module.total.time_thread));
692 
694  module_time_real_total_->Fill(i, ms(module.total.time_real));
695 
697  module_allocated_total_->Fill(i, kB(module.total.allocated));
698 
700  module_deallocated_total_->Fill(i, kB(module.total.deallocated));
701  }
702  if (module_counter_ and path.status)
703  module_counter_->Fill(path.last);
704 }
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 395 of file FastTimerService.h.

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

TH1D* FastTimerService::PlotsPerPath::module_counter_
private

Definition at line 391 of file FastTimerService.h.

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

TH1D* FastTimerService::PlotsPerPath::module_deallocated_total_
private

Definition at line 396 of file FastTimerService.h.

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

TH1D* FastTimerService::PlotsPerPath::module_time_real_total_
private

Definition at line 394 of file FastTimerService.h.

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

TH1D* FastTimerService::PlotsPerPath::module_time_thread_total_
private

Definition at line 393 of file FastTimerService.h.

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

PlotsPerElement FastTimerService::PlotsPerPath::total_
private

Definition at line 383 of file FastTimerService.h.

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