CMS 3D CMS Logo

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

Public Member Functions

void book (dqm::reco::DQMStore::IBooker &, std::string const &name, std::string const &title, PlotRanges const &ranges, unsigned int lumisections, bool byls)
 
void fill (Resources const &, unsigned int lumisection)
 
void fill (AtomicResources const &, unsigned int lumisection)
 
void fill_fraction (Resources const &, Resources const &, unsigned int lumisection)
 
 PlotsPerElement ()=default
 

Private Attributes

dqm::reco::MonitorElementallocated_ = nullptr
 
dqm::reco::MonitorElementallocated_byls_ = nullptr
 
dqm::reco::MonitorElementdeallocated_ = nullptr
 
dqm::reco::MonitorElementdeallocated_byls_ = nullptr
 
dqm::reco::MonitorElementtime_real_ = nullptr
 
dqm::reco::MonitorElementtime_real_byls_ = nullptr
 
dqm::reco::MonitorElementtime_thread_ = nullptr
 
dqm::reco::MonitorElementtime_thread_byls_ = nullptr
 

Detailed Description

Definition at line 333 of file FastTimerService.h.

Constructor & Destructor Documentation

◆ PlotsPerElement()

FastTimerService::PlotsPerElement::PlotsPerElement ( )
default

Member Function Documentation

◆ book()

void FastTimerService::PlotsPerElement::book ( dqm::reco::DQMStore::IBooker booker,
std::string const &  name,
std::string const &  title,
PlotRanges const &  ranges,
unsigned int  lumisections,
bool  byls 
)

Definition at line 380 of file FastTimerService.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::bookProfile(), reco::ceil(), infinity, createfilelist::int, memory_usage::is_available(), mergeVDriftHistosByStation::name, diffTwoXMLs::ranges, dqm::impl::MonitorElement::setXTitle(), AlCaHLTBitMon_QueryRunRegistry::string, and runGCPTkAlMap::title.

385  {
386  int time_bins = (int)std::ceil(ranges.time_range / ranges.time_resolution);
387  int mem_bins = (int)std::ceil(ranges.memory_range / ranges.memory_resolution);
388  std::string y_title_ms = fmt::sprintf("events / %.1f ms", ranges.time_resolution);
389  std::string y_title_kB = fmt::sprintf("events / %.1f kB", ranges.memory_resolution);
390 
391  // MonitorElement::setStatOverflows(kTRUE) includes underflows and overflows in the computation of mean and RMS
392  time_thread_ =
393  booker.book1D(name + " time_thread", title + " processing time (cpu)", time_bins, 0., ranges.time_range);
394  time_thread_->setXTitle("processing time [ms]");
395  time_thread_->setYTitle(y_title_ms);
397 
398  time_real_ = booker.book1D(name + " time_real", title + " processing time (real)", time_bins, 0., ranges.time_range);
399  time_real_->setXTitle("processing time [ms]");
400  time_real_->setYTitle(y_title_ms);
402 
404  allocated_ = booker.book1D(name + " allocated", title + " allocated memory", mem_bins, 0., ranges.memory_range);
405  allocated_->setXTitle("memory [kB]");
406  allocated_->setYTitle(y_title_kB);
408 
409  deallocated_ =
410  booker.book1D(name + " deallocated", title + " deallocated memory", mem_bins, 0., ranges.memory_range);
411  deallocated_->setXTitle("memory [kB]");
412  deallocated_->setYTitle(y_title_kB);
414  }
415 
416  if (not byls)
417  return;
418 
419  time_thread_byls_ = booker.bookProfile(name + " time_thread_byls",
420  title + " processing time (cpu) vs. lumisection",
421  lumisections,
422  0.5,
423  lumisections + 0.5,
424  time_bins,
425  0.,
427  " ");
428  time_thread_byls_->setXTitle("lumisection");
429  time_thread_byls_->setYTitle("processing time [ms]");
431 
432  time_real_byls_ = booker.bookProfile(name + " time_real_byls",
433  title + " processing time (real) vs. lumisection",
434  lumisections,
435  0.5,
436  lumisections + 0.5,
437  time_bins,
438  0.,
440  " ");
441  time_real_byls_->setXTitle("lumisection");
442  time_real_byls_->setYTitle("processing time [ms]");
444 
446  allocated_byls_ = booker.bookProfile(name + " allocated_byls",
447  title + " allocated memory vs. lumisection",
448  lumisections,
449  0.5,
450  lumisections + 0.5,
451  mem_bins,
452  0.,
454  " ");
455  allocated_byls_->setXTitle("lumisection");
456  allocated_byls_->setYTitle("memory [kB]");
458 
459  deallocated_byls_ = booker.bookProfile(name + " deallocated_byls",
460  title + " deallocated memory vs. lumisection",
461  lumisections,
462  0.5,
463  lumisections + 0.5,
464  mem_bins,
465  0.,
467  " ");
468  deallocated_byls_->setXTitle("lumisection");
469  deallocated_byls_->setYTitle("memory [kB]");
471  }
472 }
constexpr int32_t ceil(float num)
dqm::reco::MonitorElement * deallocated_byls_
dqm::reco::MonitorElement * time_thread_byls_
dqm::reco::MonitorElement * time_thread_
dqm::reco::MonitorElement * deallocated_
dqm::reco::MonitorElement * time_real_
virtual void setXTitle(std::string const &title)
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:408
dqm::reco::MonitorElement * time_real_byls_
const double infinity
string ranges
Definition: diffTwoXMLs.py:79
static bool is_available()
Definition: memory_usage.cc:84
virtual void setYTitle(std::string const &title)
dqm::reco::MonitorElement * allocated_byls_
virtual DQM_DEPRECATED void setStatOverflows(bool value)
dqm::reco::MonitorElement * allocated_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98

◆ fill() [1/2]

void FastTimerService::PlotsPerElement::fill ( Resources const &  data,
unsigned int  lumisection 
)

Definition at line 474 of file FastTimerService.cc.

References data.

474  {
475  if (time_thread_)
476  time_thread_->Fill(ms(data.time_thread));
477 
478  if (time_thread_byls_)
479  time_thread_byls_->Fill(lumisection, ms(data.time_thread));
480 
481  if (time_real_)
482  time_real_->Fill(ms(data.time_real));
483 
484  if (time_real_byls_)
485  time_real_byls_->Fill(lumisection, ms(data.time_real));
486 
487  if (allocated_)
488  allocated_->Fill(kB(data.allocated));
489 
490  if (allocated_byls_)
491  allocated_byls_->Fill(lumisection, kB(data.allocated));
492 
493  if (deallocated_)
494  deallocated_->Fill(kB(data.deallocated));
495 
496  if (deallocated_byls_)
497  deallocated_byls_->Fill(lumisection, kB(data.deallocated));
498 }
dqm::reco::MonitorElement * deallocated_byls_
dqm::reco::MonitorElement * time_thread_byls_
dqm::reco::MonitorElement * time_thread_
dqm::reco::MonitorElement * deallocated_
dqm::reco::MonitorElement * time_real_
void Fill(long long x)
dqm::reco::MonitorElement * time_real_byls_
dqm::reco::MonitorElement * allocated_byls_
dqm::reco::MonitorElement * allocated_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80

◆ fill() [2/2]

void FastTimerService::PlotsPerElement::fill ( AtomicResources const &  data,
unsigned int  lumisection 
)

Definition at line 500 of file FastTimerService.cc.

References data.

500  {
501  if (time_thread_)
502  time_thread_->Fill(ms(boost::chrono::nanoseconds(data.time_thread.load())));
503 
504  if (time_thread_byls_)
505  time_thread_byls_->Fill(lumisection, ms(boost::chrono::nanoseconds(data.time_thread.load())));
506 
507  if (time_real_)
508  time_real_->Fill(ms(boost::chrono::nanoseconds(data.time_real.load())));
509 
510  if (time_real_byls_)
511  time_real_byls_->Fill(lumisection, ms(boost::chrono::nanoseconds(data.time_real.load())));
512 
513  if (allocated_)
514  allocated_->Fill(kB(data.allocated));
515 
516  if (allocated_byls_)
517  allocated_byls_->Fill(lumisection, kB(data.allocated));
518 
519  if (deallocated_)
520  deallocated_->Fill(kB(data.deallocated));
521 
522  if (deallocated_byls_)
523  deallocated_byls_->Fill(lumisection, kB(data.deallocated));
524 }
boost::date_time::subsecond_duration< boost::posix_time::time_duration, 1000000000 > nanoseconds
dqm::reco::MonitorElement * deallocated_byls_
dqm::reco::MonitorElement * time_thread_byls_
dqm::reco::MonitorElement * time_thread_
dqm::reco::MonitorElement * deallocated_
dqm::reco::MonitorElement * time_real_
void Fill(long long x)
dqm::reco::MonitorElement * time_real_byls_
dqm::reco::MonitorElement * allocated_byls_
dqm::reco::MonitorElement * allocated_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80

◆ fill_fraction()

void FastTimerService::PlotsPerElement::fill_fraction ( Resources const &  data,
Resources const &  part,
unsigned int  lumisection 
)

Definition at line 526 of file FastTimerService.cc.

References data, HLT_2024v14_cff::fraction, and dqmMemoryStats::total.

528  {
529  float total;
530  float fraction;
531 
532  total = ms(data.time_thread);
533  fraction = (total > 0.) ? (ms(part.time_thread) / total) : 0.;
534  if (time_thread_)
536 
537  if (time_thread_byls_)
538  time_thread_byls_->Fill(lumisection, total, fraction);
539 
540  total = ms(data.time_real);
541  fraction = (total > 0.) ? (ms(part.time_real) / total) : 0.;
542  if (time_real_)
544 
545  if (time_real_byls_)
546  time_real_byls_->Fill(lumisection, total, fraction);
547 
548  total = kB(data.allocated);
549  fraction = (total > 0.) ? (kB(part.allocated) / total) : 0.;
550  if (allocated_)
552 
553  if (allocated_byls_)
554  allocated_byls_->Fill(lumisection, total, fraction);
555 
556  total = kB(data.deallocated);
557  fraction = (total > 0.) ? (kB(part.deallocated) / total) : 0.;
558  if (deallocated_)
560 
561  if (deallocated_byls_)
562  deallocated_byls_->Fill(lumisection, total, fraction);
563 }
dqm::reco::MonitorElement * deallocated_byls_
dqm::reco::MonitorElement * time_thread_byls_
dqm::reco::MonitorElement * time_thread_
dqm::reco::MonitorElement * deallocated_
dqm::reco::MonitorElement * time_real_
void Fill(long long x)
dqm::reco::MonitorElement * time_real_byls_
dqm::reco::MonitorElement * allocated_byls_
part
Definition: HCALResponse.h:20
dqm::reco::MonitorElement * allocated_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80

Member Data Documentation

◆ allocated_

dqm::reco::MonitorElement* FastTimerService::PlotsPerElement::allocated_ = nullptr
private

Definition at line 352 of file FastTimerService.h.

◆ allocated_byls_

dqm::reco::MonitorElement* FastTimerService::PlotsPerElement::allocated_byls_ = nullptr
private

Definition at line 353 of file FastTimerService.h.

◆ deallocated_

dqm::reco::MonitorElement* FastTimerService::PlotsPerElement::deallocated_ = nullptr
private

Definition at line 354 of file FastTimerService.h.

◆ deallocated_byls_

dqm::reco::MonitorElement* FastTimerService::PlotsPerElement::deallocated_byls_ = nullptr
private

Definition at line 355 of file FastTimerService.h.

◆ time_real_

dqm::reco::MonitorElement* FastTimerService::PlotsPerElement::time_real_ = nullptr
private

Definition at line 350 of file FastTimerService.h.

◆ time_real_byls_

dqm::reco::MonitorElement* FastTimerService::PlotsPerElement::time_real_byls_ = nullptr
private

Definition at line 351 of file FastTimerService.h.

◆ time_thread_

dqm::reco::MonitorElement* FastTimerService::PlotsPerElement::time_thread_ = nullptr
private

Definition at line 348 of file FastTimerService.h.

◆ time_thread_byls_

dqm::reco::MonitorElement* FastTimerService::PlotsPerElement::time_thread_byls_ = nullptr
private

Definition at line 349 of file FastTimerService.h.