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

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), dqm::dqmstoreimpl::DQMStore::IBooker::bookProfile(), hgcaltilesconstants::ceil(), dqm-mbProfile::format, infinity, createfilelist::int, memory_usage::is_available(), FastTimerService::PlotRanges::memory_range, FastTimerService::PlotRanges::memory_resolution, dqm::impl::MonitorElement::setXTitle(), str, AlCaHLTBitMon_QueryRunRegistry::string, FastTimerService::PlotRanges::time_range, and FastTimerService::PlotRanges::time_resolution.

Referenced by FastTimerService::PlotsPerProcess::book(), and FastTimerService::PlotsPerJob::book().

339  {
340  int time_bins = (int)std::ceil(ranges.time_range / ranges.time_resolution);
341  int mem_bins = (int)std::ceil(ranges.memory_range / ranges.memory_resolution);
342  std::string y_title_ms = (boost::format("events / %.1f ms") % ranges.time_resolution).str();
343  std::string y_title_kB = (boost::format("events / %.1f kB") % ranges.memory_resolution).str();
344 
345  time_thread_ =
346  booker.book1D(name + " time_thread", title + " processing time (cpu)", time_bins, 0., ranges.time_range);
347  time_thread_->setXTitle("processing time [ms]");
348  time_thread_->setYTitle(y_title_ms);
349 
350  time_real_ = booker.book1D(name + " time_real", title + " processing time (real)", time_bins, 0., ranges.time_range);
351  time_real_->setXTitle("processing time [ms]");
352  time_real_->setYTitle(y_title_ms);
353 
355  allocated_ = booker.book1D(name + " allocated", title + " allocated memory", mem_bins, 0., ranges.memory_range);
356  allocated_->setXTitle("memory [kB]");
357  allocated_->setYTitle(y_title_kB);
358 
359  deallocated_ =
360  booker.book1D(name + " deallocated", title + " deallocated memory", mem_bins, 0., ranges.memory_range);
361  deallocated_->setXTitle("memory [kB]");
362  deallocated_->setYTitle(y_title_kB);
363  }
364 
365  if (not byls)
366  return;
367 
368  time_thread_byls_ = booker.bookProfile(name + " time_thread_byls",
369  title + " processing time (cpu) vs. lumisection",
370  lumisections,
371  0.5,
372  lumisections + 0.5,
373  time_bins,
374  0.,
376  " ");
377  time_thread_byls_->setXTitle("lumisection");
378  time_thread_byls_->setYTitle("processing time [ms]");
379 
380  time_real_byls_ = booker.bookProfile(name + " time_real_byls",
381  title + " processing time (real) vs. lumisection",
382  lumisections,
383  0.5,
384  lumisections + 0.5,
385  time_bins,
386  0.,
388  " ");
389  time_real_byls_->setXTitle("lumisection");
390  time_real_byls_->setYTitle("processing time [ms]");
391 
393  allocated_byls_ = booker.bookProfile(name + " allocated_byls",
394  title + " allocated memory vs. lumisection",
395  lumisections,
396  0.5,
397  lumisections + 0.5,
398  mem_bins,
399  0.,
401  " ");
402  allocated_byls_->setXTitle("lumisection");
403  allocated_byls_->setYTitle("memory [kB]");
404 
405  deallocated_byls_ = booker.bookProfile(name + " deallocated_byls",
406  title + " deallocated memory vs. lumisection",
407  lumisections,
408  0.5,
409  lumisections + 0.5,
410  mem_bins,
411  0.,
413  " ");
414  deallocated_byls_->setXTitle("lumisection");
415  deallocated_byls_->setYTitle("memory [kB]");
416  }
417 }
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
Definition: DQMStore.cc:239
dqm::reco::MonitorElement * deallocated_byls_
dqm::reco::MonitorElement * time_thread_byls_
dqm::reco::MonitorElement * time_thread_
constexpr int32_t ceil(float num)
dqm::reco::MonitorElement * deallocated_
dqm::reco::MonitorElement * time_real_
virtual void setXTitle(std::string const &title)
dqm::reco::MonitorElement * time_real_byls_
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, char const *option="s")
Definition: DQMStore.cc:333
const double infinity
string ranges
Definition: diffTwoXMLs.py:79
static bool is_available()
Definition: memory_usage.cc:60
virtual void setYTitle(std::string const &title)
dqm::reco::MonitorElement * allocated_byls_
dqm::reco::MonitorElement * allocated_
#define str(s)
void FastTimerService::PlotsPerElement::fill ( Resources const &  data,
unsigned int  lumisection 
)

Definition at line 419 of file FastTimerService.cc.

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

Referenced by FastTimerService::PlotsPerProcess::fill(), FastTimerService::PlotsPerJob::fill(), FastTimerService::PlotsPerJob::fill_lumi(), and FastTimerService::PlotsPerJob::fill_run().

419  {
420  // enable underflows and overflows in the computation of mean and rms
421  TH1::StatOverflows(true);
422 
423  if (time_thread_)
424  time_thread_->Fill(ms(data.time_thread));
425 
426  if (time_thread_byls_)
427  time_thread_byls_->Fill(lumisection, ms(data.time_thread));
428 
429  if (time_real_)
430  time_real_->Fill(ms(data.time_real));
431 
432  if (time_real_byls_)
433  time_real_byls_->Fill(lumisection, ms(data.time_real));
434 
435  if (allocated_)
436  allocated_->Fill(kB(data.allocated));
437 
438  if (allocated_byls_)
439  allocated_byls_->Fill(lumisection, kB(data.allocated));
440 
441  if (deallocated_)
442  deallocated_->Fill(kB(data.deallocated));
443 
444  if (deallocated_byls_)
445  deallocated_byls_->Fill(lumisection, kB(data.deallocated));
446 }
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_
susybsm::MuonSegment ms
Definition: classes.h:31
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 448 of file FastTimerService.cc.

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

448  {
449  // enable underflows and overflows in the computation of mean and rms
450  TH1::StatOverflows(true);
451 
452  if (time_thread_)
453  time_thread_->Fill(ms(boost::chrono::nanoseconds(data.time_thread.load())));
454 
455  if (time_thread_byls_)
456  time_thread_byls_->Fill(lumisection, ms(boost::chrono::nanoseconds(data.time_thread.load())));
457 
458  if (time_real_)
459  time_real_->Fill(ms(boost::chrono::nanoseconds(data.time_real.load())));
460 
461  if (time_real_byls_)
462  time_real_byls_->Fill(lumisection, ms(boost::chrono::nanoseconds(data.time_real.load())));
463 
464  if (allocated_)
465  allocated_->Fill(kB(data.allocated));
466 
467  if (allocated_byls_)
468  allocated_byls_->Fill(lumisection, kB(data.allocated));
469 
470  if (deallocated_)
471  deallocated_->Fill(kB(data.deallocated));
472 
473  if (deallocated_byls_)
474  deallocated_byls_->Fill(lumisection, kB(data.deallocated));
475 }
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_
susybsm::MuonSegment ms
Definition: classes.h:31
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 477 of file FastTimerService.cc.

References FastTimerService::Resources::allocated, FastTimerService::Resources::deallocated, HLT_2018_cff::fraction, AnalysisDataFormats_SUSYBSMObjects::ms, FastTimerService::Resources::time_real, FastTimerService::Resources::time_thread, and FastTimerService::ResourcesPerJob::total.

479  {
480  // enable underflows and overflows in the computation of mean and rms
481  TH1::StatOverflows(true);
482 
483  float total;
484  float fraction;
485 
486  total = ms(data.time_thread);
487  fraction = (total > 0.) ? (ms(part.time_thread) / total) : 0.;
488  if (time_thread_)
489  time_thread_->Fill(total, fraction);
490 
491  if (time_thread_byls_)
492  time_thread_byls_->Fill(lumisection, total, fraction);
493 
494  total = ms(data.time_real);
495  fraction = (total > 0.) ? (ms(part.time_real) / total) : 0.;
496  if (time_real_)
497  time_real_->Fill(total, fraction);
498 
499  if (time_real_byls_)
500  time_real_byls_->Fill(lumisection, total, fraction);
501 
502  total = kB(data.allocated);
503  fraction = (total > 0.) ? (kB(part.allocated) / total) : 0.;
504  if (allocated_)
505  allocated_->Fill(total, fraction);
506 
507  if (allocated_byls_)
508  allocated_byls_->Fill(lumisection, total, fraction);
509 
510  total = kB(data.deallocated);
511  fraction = (total > 0.) ? (kB(part.deallocated) / total) : 0.;
512  if (deallocated_)
513  deallocated_->Fill(total, fraction);
514 
515  if (deallocated_byls_)
516  deallocated_byls_->Fill(lumisection, total, fraction);
517 }
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
susybsm::MuonSegment ms
Definition: classes.h:31
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 331 of file FastTimerService.h.

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

Definition at line 332 of file FastTimerService.h.

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

Definition at line 333 of file FastTimerService.h.

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

Definition at line 334 of file FastTimerService.h.

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

Definition at line 329 of file FastTimerService.h.

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

Definition at line 330 of file FastTimerService.h.

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

Definition at line 327 of file FastTimerService.h.

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

Definition at line 328 of file FastTimerService.h.