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

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

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

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

References data.

◆ fill() [2/2]

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

Definition at line 459 of file FastTimerService.cc.

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

References data.

◆ fill_fraction()

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

Definition at line 517 of file FastTimerService.cc.

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

References data, HLT_FULL_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
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: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
HLT_FULL_cff.fraction
fraction
Definition: HLT_FULL_cff.py:52861
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: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
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
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