CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
FastTimerService::PlotsPerElement Class Reference

Public Member Functions

void book (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 ()
 
void reset ()
 

Private Attributes

TH1F * allocated_
 
TProfile * allocated_byls_
 
TH1F * deallocated_
 
TProfile * deallocated_byls_
 
TH1F * time_real_
 
TProfile * time_real_byls_
 
TH1F * time_thread_
 
TProfile * time_thread_byls_
 

Detailed Description

Definition at line 352 of file FastTimerService.h.

Constructor & Destructor Documentation

FastTimerService::PlotsPerElement::PlotsPerElement ( )

Definition at line 367 of file FastTimerService.cc.

Member Function Documentation

void FastTimerService::PlotsPerElement::book ( DQMStore::IBooker booker,
std::string const &  name,
std::string const &  title,
PlotRanges const &  ranges,
unsigned int  lumisections,
bool  byls 
)

Definition at line 394 of file FastTimerService.cc.

References allocated_, allocated_byls_, DQMStore::IBooker::book1D(), DQMStore::IBooker::bookProfile(), deallocated_, deallocated_byls_, cmsPerfStripChart::format, MonitorElement::getTH1F(), MonitorElement::getTProfile(), infinity, createfilelist::int, memory_usage::is_available(), FastTimerService::PlotRanges::memory_range, FastTimerService::PlotRanges::memory_resolution, harvestTrackValidationPlots::str, AlCaHLTBitMon_QueryRunRegistry::string, FastTimerService::PlotRanges::time_range, time_real_, time_real_byls_, FastTimerService::PlotRanges::time_resolution, time_thread_, and time_thread_byls_.

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

401 {
402  int time_bins = (int) std::ceil(ranges.time_range / ranges.time_resolution);
403  int mem_bins = (int) std::ceil(ranges.memory_range / ranges.memory_resolution);
404  std::string y_title_ms = (boost::format("events / %.1f ms") % ranges.time_resolution).str();
405  std::string y_title_kB = (boost::format("events / %.1f kB") % ranges.memory_resolution).str();
406 
407  time_thread_ = booker.book1D(
408  name + " time_thread",
409  title + " processing time (cpu)",
410  time_bins, 0., ranges.time_range
411  )->getTH1F();
412  time_thread_->StatOverflows(true);
413  time_thread_->SetXTitle("processing time [ms]");
414  time_thread_->SetYTitle(y_title_ms.c_str());
415 
416  time_real_ = booker.book1D(
417  name + " time_real",
418  title + " processing time (real)",
419  time_bins, 0., ranges.time_range
420  )->getTH1F();
421  time_real_->StatOverflows(true);
422  time_real_->SetXTitle("processing time [ms]");
423  time_real_->SetYTitle(y_title_ms.c_str());
424 
426  {
427  allocated_ = booker.book1D(
428  name + " allocated",
429  title + " allocated memory",
430  mem_bins, 0., ranges.memory_range
431  )->getTH1F();
432  allocated_->StatOverflows(true);
433  allocated_->SetXTitle("memory [kB]");
434  allocated_->SetYTitle(y_title_kB.c_str());
435 
436  deallocated_ = booker.book1D(
437  name + " deallocated",
438  title + " deallocated memory",
439  mem_bins, 0., ranges.memory_range
440  )->getTH1F();
441  deallocated_->StatOverflows(true);
442  deallocated_->SetXTitle("memory [kB]");
443  deallocated_->SetYTitle(y_title_kB.c_str());
444  }
445 
446  if (not byls)
447  return;
448 
450  name + " time_thread_byls",
451  title + " processing time (cpu) vs. lumisection",
452  lumisections, 0.5, lumisections + 0.5,
453  time_bins, 0., std::numeric_limits<double>::infinity(),
454  " ")->getTProfile();
455  time_thread_byls_->StatOverflows(true);
456  time_thread_byls_->SetXTitle("lumisection");
457  time_thread_byls_->SetYTitle("processing time [ms]");
458 
459  time_real_byls_ = booker.bookProfile(
460  name + " time_real_byls",
461  title + " processing time (real) vs. lumisection",
462  lumisections, 0.5, lumisections + 0.5,
463  time_bins, 0., std::numeric_limits<double>::infinity(),
464  " ")->getTProfile();
465  time_real_byls_->StatOverflows(true);
466  time_real_byls_->SetXTitle("lumisection");
467  time_real_byls_->SetYTitle("processing time [ms]");
468 
470  {
471  allocated_byls_ = booker.bookProfile(
472  name + " allocated_byls",
473  title + " allocated memory vs. lumisection",
474  lumisections, 0.5, lumisections + 0.5,
476  " ")->getTProfile();
477  allocated_byls_->StatOverflows(true);
478  allocated_byls_->SetXTitle("lumisection");
479  allocated_byls_->SetYTitle("memory [kB]");
480 
482  name + " deallocated_byls",
483  title + " deallocated memory vs. lumisection",
484  lumisections, 0.5, lumisections + 0.5,
486  " ")->getTProfile();
487  deallocated_byls_->StatOverflows(true);
488  deallocated_byls_->SetXTitle("lumisection");
489  deallocated_byls_->SetYTitle("memory [kB]");
490  }
491 }
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
const double infinity
format
Some error handling for the usage.
string ranges
Definition: diffTwoXMLs.py:78
static bool is_available()
Definition: memory_usage.cc:65
TH1F * getTH1F(void) const
TProfile * getTProfile(void) const
void FastTimerService::PlotsPerElement::fill ( Resources const &  data,
unsigned int  lumisection 
)

Definition at line 494 of file FastTimerService.cc.

References FastTimerService::Resources::allocated, allocated_, allocated_byls_, FastTimerService::Resources::deallocated, deallocated_, deallocated_byls_, AnalysisDataFormats_SUSYBSMObjects::ms, FastTimerService::Resources::time_real, time_real_, time_real_byls_, FastTimerService::Resources::time_thread, time_thread_, and time_thread_byls_.

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

495 {
496  if (time_thread_)
497  time_thread_->Fill(ms(data.time_thread));
498 
499  if (time_thread_byls_)
500  time_thread_byls_->Fill(lumisection, ms(data.time_thread));
501 
502  if (time_real_)
503  time_real_->Fill(ms(data.time_real));
504 
505  if (time_real_byls_)
506  time_real_byls_->Fill(lumisection, ms(data.time_real));
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 }
susybsm::MuonSegment ms
Definition: classes.h:31
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
void FastTimerService::PlotsPerElement::fill ( AtomicResources const &  data,
unsigned int  lumisection 
)

Definition at line 522 of file FastTimerService.cc.

References FastTimerService::AtomicResources::allocated, allocated_, allocated_byls_, FastTimerService::AtomicResources::deallocated, deallocated_, deallocated_byls_, AnalysisDataFormats_SUSYBSMObjects::ms, FastTimerService::AtomicResources::time_real, time_real_, time_real_byls_, FastTimerService::AtomicResources::time_thread, time_thread_, and time_thread_byls_.

523 {
524  if (time_thread_)
525  time_thread_->Fill(ms(boost::chrono::nanoseconds(data.time_thread.load())));
526 
527  if (time_thread_byls_)
528  time_thread_byls_->Fill(lumisection, ms(boost::chrono::nanoseconds(data.time_thread.load())));
529 
530  if (time_real_)
531  time_real_->Fill(ms(boost::chrono::nanoseconds(data.time_real.load())));
532 
533  if (time_real_byls_)
534  time_real_byls_->Fill(lumisection, ms(boost::chrono::nanoseconds(data.time_real.load())));
535 
536  if (allocated_)
537  allocated_->Fill(kB(data.allocated));
538 
539  if (allocated_byls_)
540  allocated_byls_->Fill(lumisection, kB(data.allocated));
541 
542  if (deallocated_)
543  deallocated_->Fill(kB(data.deallocated));
544 
545  if (deallocated_byls_)
546  deallocated_byls_->Fill(lumisection, kB(data.deallocated));
547 }
susybsm::MuonSegment ms
Definition: classes.h:31
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
boost::date_time::subsecond_duration< boost::posix_time::time_duration, 1000000000 > nanoseconds
void FastTimerService::PlotsPerElement::fill_fraction ( Resources const &  data,
Resources const &  part,
unsigned int  lumisection 
)

Definition at line 550 of file FastTimerService.cc.

References FastTimerService::Resources::allocated, allocated_, allocated_byls_, FastTimerService::Resources::deallocated, deallocated_, deallocated_byls_, dedxEstimators_cff::fraction, AnalysisDataFormats_SUSYBSMObjects::ms, FastTimerService::Resources::time_real, time_real_, time_real_byls_, FastTimerService::Resources::time_thread, time_thread_, time_thread_byls_, and pileupDistInMC::total.

551 {
552  float total;
553  float fraction;
554 
555  total = ms(data.time_thread);
556  fraction = (total > 0.) ? (ms(part.time_thread) / total) : 0.;
557  if (time_thread_)
558  time_thread_->Fill(total, fraction);
559 
560  if (time_thread_byls_)
561  time_thread_byls_->Fill(lumisection, total, fraction);
562 
563  total = ms(data.time_real);
564  fraction = (total > 0.) ? (ms(part.time_real) / total) : 0.;
565  if (time_real_)
566  time_real_->Fill(total, fraction);
567 
568  if (time_real_byls_)
569  time_real_byls_->Fill(lumisection, total, fraction);
570 
571  total = kB(data.allocated);
572  fraction = (total > 0.) ? (kB(part.allocated) / total) : 0.;
573  if (allocated_)
574  allocated_->Fill(total, fraction);
575 
576  if (allocated_byls_)
577  allocated_byls_->Fill(lumisection, total, fraction);
578 
579  total = kB(data.deallocated);
580  fraction = (total > 0.) ? (kB(part.deallocated) / total) : 0.;
581  if (deallocated_)
582  deallocated_->Fill(total, fraction);
583 
584  if (deallocated_byls_)
585  deallocated_byls_->Fill(lumisection, total, fraction);
586 }
part
Definition: HCALResponse.h:20
susybsm::MuonSegment ms
Definition: classes.h:31
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
void FastTimerService::PlotsPerElement::reset ( void  )

Member Data Documentation

TH1F* FastTimerService::PlotsPerElement::allocated_
private

Definition at line 367 of file FastTimerService.h.

Referenced by book(), fill(), fill_fraction(), and reset().

TProfile* FastTimerService::PlotsPerElement::allocated_byls_
private

Definition at line 368 of file FastTimerService.h.

Referenced by book(), fill(), fill_fraction(), and reset().

TH1F* FastTimerService::PlotsPerElement::deallocated_
private

Definition at line 369 of file FastTimerService.h.

Referenced by book(), fill(), fill_fraction(), and reset().

TProfile* FastTimerService::PlotsPerElement::deallocated_byls_
private

Definition at line 370 of file FastTimerService.h.

Referenced by book(), fill(), fill_fraction(), and reset().

TH1F* FastTimerService::PlotsPerElement::time_real_
private

Definition at line 365 of file FastTimerService.h.

Referenced by book(), fill(), fill_fraction(), and reset().

TProfile* FastTimerService::PlotsPerElement::time_real_byls_
private

Definition at line 366 of file FastTimerService.h.

Referenced by book(), fill(), fill_fraction(), and reset().

TH1F* FastTimerService::PlotsPerElement::time_thread_
private

Definition at line 363 of file FastTimerService.h.

Referenced by book(), fill(), fill_fraction(), and reset().

TProfile* FastTimerService::PlotsPerElement::time_thread_byls_
private

Definition at line 364 of file FastTimerService.h.

Referenced by book(), fill(), fill_fraction(), and reset().