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_
 
dqm::reco::MonitorElementallocated_byls_
 
dqm::reco::MonitorElementdeallocated_
 
dqm::reco::MonitorElementdeallocated_byls_
 
dqm::reco::MonitorElementtime_real_
 
dqm::reco::MonitorElementtime_real_byls_
 
dqm::reco::MonitorElementtime_thread_
 
dqm::reco::MonitorElementtime_thread_byls_
 

Detailed Description

Definition at line 331 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 378 of file FastTimerService.cc.

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

383  {
384  int time_bins = (int)std::ceil(ranges.time_range / ranges.time_resolution);
385  int mem_bins = (int)std::ceil(ranges.memory_range / ranges.memory_resolution);
386  std::string y_title_ms = fmt::sprintf("events / %.1f ms", ranges.time_resolution);
387  std::string y_title_kB = fmt::sprintf("events / %.1f kB", ranges.memory_resolution);
388 
389  // MonitorElement::setStatOverflows(kTRUE) includes underflows and overflows in the computation of mean and RMS
390  time_thread_ =
391  booker.book1D(name + " time_thread", title + " processing time (cpu)", time_bins, 0., ranges.time_range);
392  time_thread_->setXTitle("processing time [ms]");
393  time_thread_->setYTitle(y_title_ms);
395 
396  time_real_ = booker.book1D(name + " time_real", title + " processing time (real)", time_bins, 0., ranges.time_range);
397  time_real_->setXTitle("processing time [ms]");
398  time_real_->setYTitle(y_title_ms);
400 
402  allocated_ = booker.book1D(name + " allocated", title + " allocated memory", mem_bins, 0., ranges.memory_range);
403  allocated_->setXTitle("memory [kB]");
404  allocated_->setYTitle(y_title_kB);
406 
407  deallocated_ =
408  booker.book1D(name + " deallocated", title + " deallocated memory", mem_bins, 0., ranges.memory_range);
409  deallocated_->setXTitle("memory [kB]");
410  deallocated_->setYTitle(y_title_kB);
412  }
413 
414  if (not byls)
415  return;
416 
417  time_thread_byls_ = booker.bookProfile(name + " time_thread_byls",
418  title + " processing time (cpu) vs. lumisection",
419  lumisections,
420  0.5,
421  lumisections + 0.5,
422  time_bins,
423  0.,
425  " ");
426  time_thread_byls_->setXTitle("lumisection");
427  time_thread_byls_->setYTitle("processing time [ms]");
429 
430  time_real_byls_ = booker.bookProfile(name + " time_real_byls",
431  title + " processing time (real) vs. lumisection",
432  lumisections,
433  0.5,
434  lumisections + 0.5,
435  time_bins,
436  0.,
438  " ");
439  time_real_byls_->setXTitle("lumisection");
440  time_real_byls_->setYTitle("processing time [ms]");
442 
444  allocated_byls_ = booker.bookProfile(name + " allocated_byls",
445  title + " allocated memory vs. lumisection",
446  lumisections,
447  0.5,
448  lumisections + 0.5,
449  mem_bins,
450  0.,
452  " ");
453  allocated_byls_->setXTitle("lumisection");
454  allocated_byls_->setYTitle("memory [kB]");
456 
457  deallocated_byls_ = booker.bookProfile(name + " deallocated_byls",
458  title + " deallocated memory vs. lumisection",
459  lumisections,
460  0.5,
461  lumisections + 0.5,
462  mem_bins,
463  0.,
465  " ");
466  deallocated_byls_->setXTitle("lumisection");
467  deallocated_byls_->setYTitle("memory [kB]");
469  }
470 }
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:399
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 472 of file FastTimerService.cc.

References data.

472  {
473  if (time_thread_)
474  time_thread_->Fill(ms(data.time_thread));
475 
476  if (time_thread_byls_)
477  time_thread_byls_->Fill(lumisection, ms(data.time_thread));
478 
479  if (time_real_)
480  time_real_->Fill(ms(data.time_real));
481 
482  if (time_real_byls_)
483  time_real_byls_->Fill(lumisection, ms(data.time_real));
484 
485  if (allocated_)
486  allocated_->Fill(kB(data.allocated));
487 
488  if (allocated_byls_)
489  allocated_byls_->Fill(lumisection, kB(data.allocated));
490 
491  if (deallocated_)
492  deallocated_->Fill(kB(data.deallocated));
493 
494  if (deallocated_byls_)
495  deallocated_byls_->Fill(lumisection, kB(data.deallocated));
496 }
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:79

◆ fill() [2/2]

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

Definition at line 498 of file FastTimerService.cc.

References data.

498  {
499  if (time_thread_)
500  time_thread_->Fill(ms(boost::chrono::nanoseconds(data.time_thread.load())));
501 
502  if (time_thread_byls_)
503  time_thread_byls_->Fill(lumisection, ms(boost::chrono::nanoseconds(data.time_thread.load())));
504 
505  if (time_real_)
506  time_real_->Fill(ms(boost::chrono::nanoseconds(data.time_real.load())));
507 
508  if (time_real_byls_)
509  time_real_byls_->Fill(lumisection, ms(boost::chrono::nanoseconds(data.time_real.load())));
510 
511  if (allocated_)
512  allocated_->Fill(kB(data.allocated));
513 
514  if (allocated_byls_)
515  allocated_byls_->Fill(lumisection, kB(data.allocated));
516 
517  if (deallocated_)
518  deallocated_->Fill(kB(data.deallocated));
519 
520  if (deallocated_byls_)
521  deallocated_byls_->Fill(lumisection, kB(data.deallocated));
522 }
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:79

◆ fill_fraction()

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

Definition at line 524 of file FastTimerService.cc.

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

526  {
527  float total;
528  float fraction;
529 
530  total = ms(data.time_thread);
531  fraction = (total > 0.) ? (ms(part.time_thread) / total) : 0.;
532  if (time_thread_)
534 
535  if (time_thread_byls_)
536  time_thread_byls_->Fill(lumisection, total, fraction);
537 
538  total = ms(data.time_real);
539  fraction = (total > 0.) ? (ms(part.time_real) / total) : 0.;
540  if (time_real_)
542 
543  if (time_real_byls_)
544  time_real_byls_->Fill(lumisection, total, fraction);
545 
546  total = kB(data.allocated);
547  fraction = (total > 0.) ? (kB(part.allocated) / total) : 0.;
548  if (allocated_)
550 
551  if (allocated_byls_)
552  allocated_byls_->Fill(lumisection, total, fraction);
553 
554  total = kB(data.deallocated);
555  fraction = (total > 0.) ? (kB(part.deallocated) / total) : 0.;
556  if (deallocated_)
558 
559  if (deallocated_byls_)
560  deallocated_byls_->Fill(lumisection, total, fraction);
561 }
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:79

Member Data Documentation

◆ allocated_

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

Definition at line 350 of file FastTimerService.h.

◆ allocated_byls_

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

Definition at line 351 of file FastTimerService.h.

◆ deallocated_

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

Definition at line 352 of file FastTimerService.h.

◆ deallocated_byls_

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

Definition at line 353 of file FastTimerService.h.

◆ time_real_

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

Definition at line 348 of file FastTimerService.h.

◆ time_real_byls_

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

Definition at line 349 of file FastTimerService.h.

◆ time_thread_

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

Definition at line 346 of file FastTimerService.h.

◆ time_thread_byls_

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

Definition at line 347 of file FastTimerService.h.