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 (AtomicResources const &, unsigned int lumisection)
 
void fill (Resources 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

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

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 }

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.

◆ fill() [1/2]

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

Definition at line 495 of file FastTimerService.cc.

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 }

References data.

◆ fill() [2/2]

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

Definition at line 469 of file FastTimerService.cc.

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 }

References data.

◆ fill_fraction()

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

Definition at line 521 of file FastTimerService.cc.

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_)
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_)
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_)
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_)
555 
556  if (deallocated_byls_)
557  deallocated_byls_->Fill(lumisection, total, fraction);
558 }

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

Member Data Documentation

◆ allocated_

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

Definition at line 345 of file FastTimerService.h.

◆ allocated_byls_

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

Definition at line 346 of file FastTimerService.h.

◆ deallocated_

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

Definition at line 347 of file FastTimerService.h.

◆ deallocated_byls_

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

Definition at line 348 of file FastTimerService.h.

◆ time_real_

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

Definition at line 343 of file FastTimerService.h.

◆ time_real_byls_

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

Definition at line 344 of file FastTimerService.h.

◆ time_thread_

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

Definition at line 341 of file FastTimerService.h.

◆ time_thread_byls_

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

Definition at line 342 of file FastTimerService.h.

diffTwoXMLs.ranges
string ranges
Definition: diffTwoXMLs.py:79
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
cond::time::nanoseconds
boost::date_time::subsecond_duration< boost::posix_time::time_duration, 1000000000 > nanoseconds
Definition: TimeConversions.h:16
FastTimerService::PlotsPerElement::time_thread_byls_
dqm::reco::MonitorElement * time_thread_byls_
Definition: FastTimerService.h:342
FastTimerService::PlotsPerElement::time_thread_
dqm::reco::MonitorElement * time_thread_
Definition: FastTimerService.h:341
infinity
const double infinity
Definition: CSCChamberFitter.cc:10
part
part
Definition: HCALResponse.h:20
reco::ceil
constexpr int32_t ceil(float num)
Definition: constexpr_cmath.h:7
HLT_FULL_cff.fraction
fraction
Definition: HLT_FULL_cff.py:52806
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
dqm::implementation::IBooker::bookProfile
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::impl::MonitorElement::setXTitle
virtual void setXTitle(std::string const &title)
Definition: MonitorElement.cc:861
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FastTimerService::PlotsPerElement::time_real_
dqm::reco::MonitorElement * time_real_
Definition: FastTimerService.h:343
FastTimerService::PlotsPerElement::deallocated_
dqm::reco::MonitorElement * deallocated_
Definition: FastTimerService.h:347
createfilelist.int
int
Definition: createfilelist.py:10
FastTimerService::PlotsPerElement::allocated_
dqm::reco::MonitorElement * allocated_
Definition: FastTimerService.h:345
dqm::impl::MonitorElement::setYTitle
virtual void setYTitle(std::string const &title)
Definition: MonitorElement.cc:866
FastTimerService::PlotsPerElement::time_real_byls_
dqm::reco::MonitorElement * time_real_byls_
Definition: FastTimerService.h:344
dqm::impl::MonitorElement::setStatOverflows
virtual DQM_DEPRECATED void setStatOverflows(bool value)
Definition: MonitorElement.cc:907
FastTimerService::PlotsPerElement::allocated_byls_
dqm::reco::MonitorElement * allocated_byls_
Definition: FastTimerService.h:346
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
dqmMemoryStats.total
total
Definition: dqmMemoryStats.py:152
memory_usage::is_available
static bool is_available()
Definition: memory_usage.cc:84
FastTimerService::PlotsPerElement::deallocated_byls_
dqm::reco::MonitorElement * deallocated_byls_
Definition: FastTimerService.h:348
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98