CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 326 of file FastTimerService.h.

Constructor & Destructor Documentation

FastTimerService::PlotsPerElement::PlotsPerElement ( )
default

Member Function Documentation

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 375 of file FastTimerService.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::bookProfile(), reco::ceil(), infinity, memory_usage::is_available(), FastTimerService::PlotRanges::memory_range, FastTimerService::PlotRanges::memory_resolution, dqm::impl::MonitorElement::setXTitle(), AlCaHLTBitMon_QueryRunRegistry::string, FastTimerService::PlotRanges::time_range, and FastTimerService::PlotRanges::time_resolution.

380  {
381  int time_bins = (int)std::ceil(ranges.time_range / ranges.time_resolution);
382  int mem_bins = (int)std::ceil(ranges.memory_range / ranges.memory_resolution);
383  std::string y_title_ms = fmt::sprintf("events / %.1f ms", ranges.time_resolution);
384  std::string y_title_kB = fmt::sprintf("events / %.1f kB", ranges.memory_resolution);
385 
386  // MonitorElement::setStatOverflows(kTRUE) includes underflows and overflows in the computation of mean and RMS
387  time_thread_ =
388  booker.book1D(name + " time_thread", title + " processing time (cpu)", time_bins, 0., ranges.time_range);
389  time_thread_->setXTitle("processing time [ms]");
390  time_thread_->setYTitle(y_title_ms);
392 
393  time_real_ = booker.book1D(name + " time_real", title + " processing time (real)", time_bins, 0., ranges.time_range);
394  time_real_->setXTitle("processing time [ms]");
395  time_real_->setYTitle(y_title_ms);
397 
399  allocated_ = booker.book1D(name + " allocated", title + " allocated memory", mem_bins, 0., ranges.memory_range);
400  allocated_->setXTitle("memory [kB]");
401  allocated_->setYTitle(y_title_kB);
403 
404  deallocated_ =
405  booker.book1D(name + " deallocated", title + " deallocated memory", mem_bins, 0., ranges.memory_range);
406  deallocated_->setXTitle("memory [kB]");
407  deallocated_->setYTitle(y_title_kB);
409  }
410 
411  if (not byls)
412  return;
413 
414  time_thread_byls_ = booker.bookProfile(name + " time_thread_byls",
415  title + " processing time (cpu) vs. lumisection",
416  lumisections,
417  0.5,
418  lumisections + 0.5,
419  time_bins,
420  0.,
422  " ");
423  time_thread_byls_->setXTitle("lumisection");
424  time_thread_byls_->setYTitle("processing time [ms]");
426 
427  time_real_byls_ = booker.bookProfile(name + " time_real_byls",
428  title + " processing time (real) vs. lumisection",
429  lumisections,
430  0.5,
431  lumisections + 0.5,
432  time_bins,
433  0.,
435  " ");
436  time_real_byls_->setXTitle("lumisection");
437  time_real_byls_->setYTitle("processing time [ms]");
439 
441  allocated_byls_ = booker.bookProfile(name + " allocated_byls",
442  title + " allocated memory vs. lumisection",
443  lumisections,
444  0.5,
445  lumisections + 0.5,
446  mem_bins,
447  0.,
449  " ");
450  allocated_byls_->setXTitle("lumisection");
451  allocated_byls_->setYTitle("memory [kB]");
453 
454  deallocated_byls_ = booker.bookProfile(name + " deallocated_byls",
455  title + " deallocated memory vs. lumisection",
456  lumisections,
457  0.5,
458  lumisections + 0.5,
459  mem_bins,
460  0.,
462  " ");
463  deallocated_byls_->setXTitle("lumisection");
464  deallocated_byls_->setYTitle("memory [kB]");
466  }
467 }
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:322
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
void FastTimerService::PlotsPerElement::fill ( Resources const &  data,
unsigned int  lumisection 
)

Definition at line 469 of file FastTimerService.cc.

References FastTimerService::Resources::allocated, FastTimerService::Resources::deallocated, FastTimerService::Resources::time_real, and FastTimerService::Resources::time_thread.

469  {
470  if (time_thread_)
471  time_thread_->Fill(ms(data.time_thread));
472 
473  if (time_thread_byls_)
474  time_thread_byls_->Fill(lumisection, ms(data.time_thread));
475 
476  if (time_real_)
477  time_real_->Fill(ms(data.time_real));
478 
479  if (time_real_byls_)
480  time_real_byls_->Fill(lumisection, ms(data.time_real));
481 
482  if (allocated_)
483  allocated_->Fill(kB(data.allocated));
484 
485  if (allocated_byls_)
486  allocated_byls_->Fill(lumisection, kB(data.allocated));
487 
488  if (deallocated_)
489  deallocated_->Fill(kB(data.deallocated));
490 
491  if (deallocated_byls_)
492  deallocated_byls_->Fill(lumisection, kB(data.deallocated));
493 }
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
void FastTimerService::PlotsPerElement::fill ( AtomicResources const &  data,
unsigned int  lumisection 
)

Definition at line 495 of file FastTimerService.cc.

References FastTimerService::AtomicResources::allocated, FastTimerService::AtomicResources::deallocated, FastTimerService::AtomicResources::time_real, and FastTimerService::AtomicResources::time_thread.

495  {
496  if (time_thread_)
497  time_thread_->Fill(ms(boost::chrono::nanoseconds(data.time_thread.load())));
498 
499  if (time_thread_byls_)
500  time_thread_byls_->Fill(lumisection, ms(boost::chrono::nanoseconds(data.time_thread.load())));
501 
502  if (time_real_)
503  time_real_->Fill(ms(boost::chrono::nanoseconds(data.time_real.load())));
504 
505  if (time_real_byls_)
506  time_real_byls_->Fill(lumisection, ms(boost::chrono::nanoseconds(data.time_real.load())));
507 
508  if (allocated_)
509  allocated_->Fill(kB(data.allocated));
510 
511  if (allocated_byls_)
512  allocated_byls_->Fill(lumisection, kB(data.allocated));
513 
514  if (deallocated_)
515  deallocated_->Fill(kB(data.deallocated));
516 
517  if (deallocated_byls_)
518  deallocated_byls_->Fill(lumisection, kB(data.deallocated));
519 }
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
void FastTimerService::PlotsPerElement::fill_fraction ( Resources const &  data,
Resources const &  part,
unsigned int  lumisection 
)

Definition at line 521 of file FastTimerService.cc.

References FastTimerService::Resources::allocated, FastTimerService::Resources::deallocated, HLT_FULL_cff::fraction, FastTimerService::Resources::time_real, FastTimerService::Resources::time_thread, and dqmMemoryStats::total.

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

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

Definition at line 345 of file FastTimerService.h.

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

Definition at line 346 of file FastTimerService.h.

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

Definition at line 347 of file FastTimerService.h.

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

Definition at line 348 of file FastTimerService.h.

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

Definition at line 343 of file FastTimerService.h.

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

Definition at line 344 of file FastTimerService.h.

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

Definition at line 341 of file FastTimerService.h.

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

Definition at line 342 of file FastTimerService.h.