CMS 3D CMS Logo

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

Public Member Functions

void book (DQMStore::ConcurrentBooker &, 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

ConcurrentMonitorElement allocated_
 
ConcurrentMonitorElement allocated_byls_
 
ConcurrentMonitorElement deallocated_
 
ConcurrentMonitorElement deallocated_byls_
 
ConcurrentMonitorElement time_real_
 
ConcurrentMonitorElement time_real_byls_
 
ConcurrentMonitorElement time_thread_
 
ConcurrentMonitorElement time_thread_byls_
 

Detailed Description

Definition at line 315 of file FastTimerService.h.

Constructor & Destructor Documentation

FastTimerService::PlotsPerElement::PlotsPerElement ( )
default

Member Function Documentation

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

Definition at line 385 of file FastTimerService.cc.

References DQMStore::ConcurrentBooker::book1D(), DQMStore::ConcurrentBooker::bookProfile(), cmsPerfStripChart::format, infinity, createfilelist::int, memory_usage::is_available(), FastTimerService::PlotRanges::memory_range, FastTimerService::PlotRanges::memory_resolution, ConcurrentMonitorElement::setXTitle(), str, AlCaHLTBitMon_QueryRunRegistry::string, FastTimerService::PlotRanges::time_range, and FastTimerService::PlotRanges::time_resolution.

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

392 {
393  int time_bins = (int) std::ceil(ranges.time_range / ranges.time_resolution);
394  int mem_bins = (int) std::ceil(ranges.memory_range / ranges.memory_resolution);
395  std::string y_title_ms = (boost::format("events / %.1f ms") % ranges.time_resolution).str();
396  std::string y_title_kB = (boost::format("events / %.1f kB") % ranges.memory_resolution).str();
397 
398  time_thread_ = booker.book1D(
399  name + " time_thread",
400  title + " processing time (cpu)",
401  time_bins, 0., ranges.time_range);
402  time_thread_.setXTitle("processing time [ms]");
403  time_thread_.setYTitle(y_title_ms.c_str());
404 
405  time_real_ = booker.book1D(
406  name + " time_real",
407  title + " processing time (real)",
408  time_bins, 0., ranges.time_range);
409  time_real_.setXTitle("processing time [ms]");
410  time_real_.setYTitle(y_title_ms.c_str());
411 
413  {
414  allocated_ = booker.book1D(
415  name + " allocated",
416  title + " allocated memory",
417  mem_bins, 0., ranges.memory_range);
418  allocated_.setXTitle("memory [kB]");
419  allocated_.setYTitle(y_title_kB.c_str());
420 
421  deallocated_ = booker.book1D(
422  name + " deallocated",
423  title + " deallocated memory",
424  mem_bins, 0., ranges.memory_range);
425  deallocated_.setXTitle("memory [kB]");
426  deallocated_.setYTitle(y_title_kB.c_str());
427  }
428 
429  if (not byls)
430  return;
431 
433  name + " time_thread_byls",
434  title + " processing time (cpu) vs. lumisection",
435  lumisections, 0.5, lumisections + 0.5,
436  time_bins, 0., std::numeric_limits<double>::infinity(),
437  " ");
438  time_thread_byls_.setXTitle("lumisection");
439  time_thread_byls_.setYTitle("processing time [ms]");
440 
441  time_real_byls_ = booker.bookProfile(
442  name + " time_real_byls",
443  title + " processing time (real) vs. lumisection",
444  lumisections, 0.5, lumisections + 0.5,
445  time_bins, 0., std::numeric_limits<double>::infinity(),
446  " ");
447  time_real_byls_.setXTitle("lumisection");
448  time_real_byls_.setYTitle("processing time [ms]");
449 
451  {
452  allocated_byls_ = booker.bookProfile(
453  name + " allocated_byls",
454  title + " allocated memory vs. lumisection",
455  lumisections, 0.5, lumisections + 0.5,
457  " ");
458  allocated_byls_.setXTitle("lumisection");
459  allocated_byls_.setYTitle("memory [kB]");
460 
462  name + " deallocated_byls",
463  title + " deallocated memory vs. lumisection",
464  lumisections, 0.5, lumisections + 0.5,
466  " ");
467  deallocated_byls_.setXTitle("lumisection");
468  deallocated_byls_.setYTitle("memory [kB]");
469  }
470 }
ConcurrentMonitorElement time_thread_
ConcurrentMonitorElement bookProfile(Args &&...args)
Definition: DQMStore.h:272
ConcurrentMonitorElement time_real_byls_
ConcurrentMonitorElement time_thread_byls_
ConcurrentMonitorElement time_real_
void setYTitle(std::string const &title)
ConcurrentMonitorElement deallocated_byls_
const double infinity
ConcurrentMonitorElement book1D(Args &&...args)
Definition: DQMStore.h:223
format
Some error handling for the usage.
string ranges
Definition: diffTwoXMLs.py:78
ConcurrentMonitorElement allocated_byls_
ConcurrentMonitorElement deallocated_
static bool is_available()
Definition: memory_usage.cc:65
ConcurrentMonitorElement allocated_
#define str(s)
void setXTitle(std::string const &title)
void FastTimerService::PlotsPerElement::fill ( Resources const &  data,
unsigned int  lumisection 
)

Definition at line 473 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().

474 {
475  // enable underflows and overflows in the computation of mean and rms
476  TH1::StatOverflows(true);
477 
478  if (time_thread_)
479  time_thread_.fill(ms(data.time_thread));
480 
481  if (time_thread_byls_)
482  time_thread_byls_.fill(lumisection, ms(data.time_thread));
483 
484  if (time_real_)
485  time_real_.fill(ms(data.time_real));
486 
487  if (time_real_byls_)
488  time_real_byls_.fill(lumisection, ms(data.time_real));
489 
490  if (allocated_)
491  allocated_.fill(kB(data.allocated));
492 
493  if (allocated_byls_)
494  allocated_byls_.fill(lumisection, kB(data.allocated));
495 
496  if (deallocated_)
497  deallocated_.fill(kB(data.deallocated));
498 
499  if (deallocated_byls_)
500  deallocated_byls_.fill(lumisection, kB(data.deallocated));
501 }
ConcurrentMonitorElement time_thread_
ConcurrentMonitorElement time_real_byls_
ConcurrentMonitorElement time_thread_byls_
ConcurrentMonitorElement time_real_
ConcurrentMonitorElement deallocated_byls_
ConcurrentMonitorElement allocated_byls_
ConcurrentMonitorElement deallocated_
susybsm::MuonSegment ms
Definition: classes.h:31
ConcurrentMonitorElement allocated_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
void fill(Args &&...args) const
void FastTimerService::PlotsPerElement::fill ( AtomicResources const &  data,
unsigned int  lumisection 
)

Definition at line 504 of file FastTimerService.cc.

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

505 {
506  // enable underflows and overflows in the computation of mean and rms
507  TH1::StatOverflows(true);
508 
509  if (time_thread_)
510  time_thread_.fill(ms(boost::chrono::nanoseconds(data.time_thread.load())));
511 
512  if (time_thread_byls_)
513  time_thread_byls_.fill(lumisection, ms(boost::chrono::nanoseconds(data.time_thread.load())));
514 
515  if (time_real_)
516  time_real_.fill(ms(boost::chrono::nanoseconds(data.time_real.load())));
517 
518  if (time_real_byls_)
519  time_real_byls_.fill(lumisection, ms(boost::chrono::nanoseconds(data.time_real.load())));
520 
521  if (allocated_)
522  allocated_.fill(kB(data.allocated));
523 
524  if (allocated_byls_)
525  allocated_byls_.fill(lumisection, kB(data.allocated));
526 
527  if (deallocated_)
528  deallocated_.fill(kB(data.deallocated));
529 
530  if (deallocated_byls_)
531  deallocated_byls_.fill(lumisection, kB(data.deallocated));
532 }
ConcurrentMonitorElement time_thread_
ConcurrentMonitorElement time_real_byls_
ConcurrentMonitorElement time_thread_byls_
ConcurrentMonitorElement time_real_
ConcurrentMonitorElement deallocated_byls_
ConcurrentMonitorElement allocated_byls_
ConcurrentMonitorElement deallocated_
susybsm::MuonSegment ms
Definition: classes.h:31
ConcurrentMonitorElement allocated_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
void fill(Args &&...args) const
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 535 of file FastTimerService.cc.

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

536 {
537  // enable underflows and overflows in the computation of mean and rms
538  TH1::StatOverflows(true);
539 
540  float total;
541  float fraction;
542 
543  total = ms(data.time_thread);
544  fraction = (total > 0.) ? (ms(part.time_thread) / total) : 0.;
545  if (time_thread_)
546  time_thread_.fill(total, fraction);
547 
548  if (time_thread_byls_)
549  time_thread_byls_.fill(lumisection, total, fraction);
550 
551  total = ms(data.time_real);
552  fraction = (total > 0.) ? (ms(part.time_real) / total) : 0.;
553  if (time_real_)
554  time_real_.fill(total, fraction);
555 
556  if (time_real_byls_)
557  time_real_byls_.fill(lumisection, total, fraction);
558 
559  total = kB(data.allocated);
560  fraction = (total > 0.) ? (kB(part.allocated) / total) : 0.;
561  if (allocated_)
562  allocated_.fill(total, fraction);
563 
564  if (allocated_byls_)
565  allocated_byls_.fill(lumisection, total, fraction);
566 
567  total = kB(data.deallocated);
568  fraction = (total > 0.) ? (kB(part.deallocated) / total) : 0.;
569  if (deallocated_)
570  deallocated_.fill(total, fraction);
571 
572  if (deallocated_byls_)
573  deallocated_byls_.fill(lumisection, total, fraction);
574 }
ConcurrentMonitorElement time_thread_
ConcurrentMonitorElement time_real_byls_
ConcurrentMonitorElement time_thread_byls_
ConcurrentMonitorElement time_real_
ConcurrentMonitorElement deallocated_byls_
ConcurrentMonitorElement allocated_byls_
ConcurrentMonitorElement deallocated_
part
Definition: HCALResponse.h:20
susybsm::MuonSegment ms
Definition: classes.h:31
ConcurrentMonitorElement allocated_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
void fill(Args &&...args) const

Member Data Documentation

ConcurrentMonitorElement FastTimerService::PlotsPerElement::allocated_
private

Definition at line 329 of file FastTimerService.h.

ConcurrentMonitorElement FastTimerService::PlotsPerElement::allocated_byls_
private

Definition at line 330 of file FastTimerService.h.

ConcurrentMonitorElement FastTimerService::PlotsPerElement::deallocated_
private

Definition at line 331 of file FastTimerService.h.

ConcurrentMonitorElement FastTimerService::PlotsPerElement::deallocated_byls_
private

Definition at line 332 of file FastTimerService.h.

ConcurrentMonitorElement FastTimerService::PlotsPerElement::time_real_
private

Definition at line 327 of file FastTimerService.h.

ConcurrentMonitorElement FastTimerService::PlotsPerElement::time_real_byls_
private

Definition at line 328 of file FastTimerService.h.

ConcurrentMonitorElement FastTimerService::PlotsPerElement::time_thread_
private

Definition at line 325 of file FastTimerService.h.

ConcurrentMonitorElement FastTimerService::PlotsPerElement::time_thread_byls_
private

Definition at line 326 of file FastTimerService.h.