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

377  {
378  int time_bins = (int)std::ceil(ranges.time_range / ranges.time_resolution);
379  int mem_bins = (int)std::ceil(ranges.memory_range / ranges.memory_resolution);
380  std::string y_title_ms = (boost::format("events / %.1f ms") % ranges.time_resolution).str();
381  std::string y_title_kB = (boost::format("events / %.1f kB") % ranges.memory_resolution).str();
382 
383  time_thread_ =
384  booker.book1D(name + " time_thread", title + " processing time (cpu)", time_bins, 0., ranges.time_range);
385  time_thread_->setXTitle("processing time [ms]");
386  time_thread_->setYTitle(y_title_ms);
387 
388  time_real_ = booker.book1D(name + " time_real", title + " processing time (real)", time_bins, 0., ranges.time_range);
389  time_real_->setXTitle("processing time [ms]");
390  time_real_->setYTitle(y_title_ms);
391 
393  allocated_ = booker.book1D(name + " allocated", title + " allocated memory", mem_bins, 0., ranges.memory_range);
394  allocated_->setXTitle("memory [kB]");
395  allocated_->setYTitle(y_title_kB);
396 
397  deallocated_ =
398  booker.book1D(name + " deallocated", title + " deallocated memory", mem_bins, 0., ranges.memory_range);
399  deallocated_->setXTitle("memory [kB]");
400  deallocated_->setYTitle(y_title_kB);
401  }
402 
403  if (not byls)
404  return;
405 
406  time_thread_byls_ = booker.bookProfile(name + " time_thread_byls",
407  title + " processing time (cpu) vs. lumisection",
408  lumisections,
409  0.5,
410  lumisections + 0.5,
411  time_bins,
412  0.,
414  " ");
415  time_thread_byls_->setXTitle("lumisection");
416  time_thread_byls_->setYTitle("processing time [ms]");
417 
418  time_real_byls_ = booker.bookProfile(name + " time_real_byls",
419  title + " processing time (real) vs. lumisection",
420  lumisections,
421  0.5,
422  lumisections + 0.5,
423  time_bins,
424  0.,
426  " ");
427  time_real_byls_->setXTitle("lumisection");
428  time_real_byls_->setYTitle("processing time [ms]");
429 
431  allocated_byls_ = booker.bookProfile(name + " allocated_byls",
432  title + " allocated memory vs. lumisection",
433  lumisections,
434  0.5,
435  lumisections + 0.5,
436  mem_bins,
437  0.,
439  " ");
440  allocated_byls_->setXTitle("lumisection");
441  allocated_byls_->setYTitle("memory [kB]");
442 
443  deallocated_byls_ = booker.bookProfile(name + " deallocated_byls",
444  title + " deallocated memory vs. lumisection",
445  lumisections,
446  0.5,
447  lumisections + 0.5,
448  mem_bins,
449  0.,
451  " ");
452  deallocated_byls_->setXTitle("lumisection");
453  deallocated_byls_->setYTitle("memory [kB]");
454  }
455 }

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

◆ fill() [1/2]

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

Definition at line 486 of file FastTimerService.cc.

486  {
487  // enable underflows and overflows in the computation of mean and rms
488  TH1::StatOverflows(true);
489 
490  if (time_thread_)
491  time_thread_->Fill(ms(boost::chrono::nanoseconds(data.time_thread.load())));
492 
493  if (time_thread_byls_)
494  time_thread_byls_->Fill(lumisection, ms(boost::chrono::nanoseconds(data.time_thread.load())));
495 
496  if (time_real_)
497  time_real_->Fill(ms(boost::chrono::nanoseconds(data.time_real.load())));
498 
499  if (time_real_byls_)
500  time_real_byls_->Fill(lumisection, ms(boost::chrono::nanoseconds(data.time_real.load())));
501 
502  if (allocated_)
503  allocated_->Fill(kB(data.allocated));
504 
505  if (allocated_byls_)
506  allocated_byls_->Fill(lumisection, kB(data.allocated));
507 
508  if (deallocated_)
509  deallocated_->Fill(kB(data.deallocated));
510 
511  if (deallocated_byls_)
512  deallocated_byls_->Fill(lumisection, kB(data.deallocated));
513 }

References data.

◆ fill() [2/2]

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

Definition at line 457 of file FastTimerService.cc.

457  {
458  // enable underflows and overflows in the computation of mean and rms
459  TH1::StatOverflows(true);
460 
461  if (time_thread_)
462  time_thread_->Fill(ms(data.time_thread));
463 
464  if (time_thread_byls_)
465  time_thread_byls_->Fill(lumisection, ms(data.time_thread));
466 
467  if (time_real_)
468  time_real_->Fill(ms(data.time_real));
469 
470  if (time_real_byls_)
471  time_real_byls_->Fill(lumisection, ms(data.time_real));
472 
473  if (allocated_)
474  allocated_->Fill(kB(data.allocated));
475 
476  if (allocated_byls_)
477  allocated_byls_->Fill(lumisection, kB(data.allocated));
478 
479  if (deallocated_)
480  deallocated_->Fill(kB(data.deallocated));
481 
482  if (deallocated_byls_)
483  deallocated_byls_->Fill(lumisection, kB(data.deallocated));
484 }

References data.

◆ fill_fraction()

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

Definition at line 515 of file FastTimerService.cc.

517  {
518  // enable underflows and overflows in the computation of mean and rms
519  TH1::StatOverflows(true);
520 
521  float total;
522  float fraction;
523 
524  total = ms(data.time_thread);
525  fraction = (total > 0.) ? (ms(part.time_thread) / total) : 0.;
526  if (time_thread_)
528 
529  if (time_thread_byls_)
530  time_thread_byls_->Fill(lumisection, total, fraction);
531 
532  total = ms(data.time_real);
533  fraction = (total > 0.) ? (ms(part.time_real) / total) : 0.;
534  if (time_real_)
536 
537  if (time_real_byls_)
538  time_real_byls_->Fill(lumisection, total, fraction);
539 
540  total = kB(data.allocated);
541  fraction = (total > 0.) ? (kB(part.allocated) / total) : 0.;
542  if (allocated_)
544 
545  if (allocated_byls_)
546  allocated_byls_->Fill(lumisection, total, fraction);
547 
548  total = kB(data.deallocated);
549  fraction = (total > 0.) ? (kB(part.deallocated) / total) : 0.;
550  if (deallocated_)
552 
553  if (deallocated_byls_)
554  deallocated_byls_->Fill(lumisection, total, fraction);
555 }

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

Member Data Documentation

◆ allocated_

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

Definition at line 344 of file FastTimerService.h.

◆ allocated_byls_

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

Definition at line 345 of file FastTimerService.h.

◆ deallocated_

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

Definition at line 346 of file FastTimerService.h.

◆ deallocated_byls_

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

Definition at line 347 of file FastTimerService.h.

◆ time_real_

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

Definition at line 342 of file FastTimerService.h.

◆ time_real_byls_

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

Definition at line 343 of file FastTimerService.h.

◆ time_thread_

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

Definition at line 340 of file FastTimerService.h.

◆ time_thread_byls_

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

Definition at line 341 of file FastTimerService.h.

diffTwoXMLs.ranges
string ranges
Definition: diffTwoXMLs.py:79
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:341
FastTimerService::PlotsPerElement::time_thread_
dqm::reco::MonitorElement * time_thread_
Definition: FastTimerService.h:340
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
dqm-mbProfile.format
format
Definition: dqm-mbProfile.py:16
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
str
#define str(s)
Definition: TestProcessor.cc:48
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:342
FastTimerService::PlotsPerElement::deallocated_
dqm::reco::MonitorElement * deallocated_
Definition: FastTimerService.h:346
createfilelist.int
int
Definition: createfilelist.py:10
FastTimerService::PlotsPerElement::allocated_
dqm::reco::MonitorElement * allocated_
Definition: FastTimerService.h:344
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:343
overlapproblemtsosanalyzer_cfi.title
title
Definition: overlapproblemtsosanalyzer_cfi.py:7
FastTimerService::PlotsPerElement::allocated_byls_
dqm::reco::MonitorElement * allocated_byls_
Definition: FastTimerService.h:345
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:347
HLT_2018_cff.fraction
fraction
Definition: HLT_2018_cff.py:51317
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