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 ()
 

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 322 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 361 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(), harvestTrackValidationPlots::str, AlCaHLTBitMon_QueryRunRegistry::string, FastTimerService::PlotRanges::time_range, and FastTimerService::PlotRanges::time_resolution.

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

368 {
369  int time_bins = (int) std::ceil(ranges.time_range / ranges.time_resolution);
370  int mem_bins = (int) std::ceil(ranges.memory_range / ranges.memory_resolution);
371  std::string y_title_ms = (boost::format("events / %.1f ms") % ranges.time_resolution).str();
372  std::string y_title_kB = (boost::format("events / %.1f kB") % ranges.memory_resolution).str();
373 
374  time_thread_ = booker.book1D(
375  name + " time_thread",
376  title + " processing time (cpu)",
377  time_bins, 0., ranges.time_range);
378  time_thread_.setXTitle("processing time [ms]");
379  time_thread_.setYTitle(y_title_ms.c_str());
380 
381  time_real_ = booker.book1D(
382  name + " time_real",
383  title + " processing time (real)",
384  time_bins, 0., ranges.time_range);
385  time_real_.setXTitle("processing time [ms]");
386  time_real_.setYTitle(y_title_ms.c_str());
387 
389  {
390  allocated_ = booker.book1D(
391  name + " allocated",
392  title + " allocated memory",
393  mem_bins, 0., ranges.memory_range);
394  allocated_.setXTitle("memory [kB]");
395  allocated_.setYTitle(y_title_kB.c_str());
396 
397  deallocated_ = booker.book1D(
398  name + " deallocated",
399  title + " deallocated memory",
400  mem_bins, 0., ranges.memory_range);
401  deallocated_.setXTitle("memory [kB]");
402  deallocated_.setYTitle(y_title_kB.c_str());
403  }
404 
405  if (not byls)
406  return;
407 
409  name + " time_thread_byls",
410  title + " processing time (cpu) vs. lumisection",
411  lumisections, 0.5, lumisections + 0.5,
412  time_bins, 0., std::numeric_limits<double>::infinity(),
413  " ");
414  time_thread_byls_.setXTitle("lumisection");
415  time_thread_byls_.setYTitle("processing time [ms]");
416 
417  time_real_byls_ = booker.bookProfile(
418  name + " time_real_byls",
419  title + " processing time (real) vs. lumisection",
420  lumisections, 0.5, lumisections + 0.5,
421  time_bins, 0., std::numeric_limits<double>::infinity(),
422  " ");
423  time_real_byls_.setXTitle("lumisection");
424  time_real_byls_.setYTitle("processing time [ms]");
425 
427  {
428  allocated_byls_ = booker.bookProfile(
429  name + " allocated_byls",
430  title + " allocated memory vs. lumisection",
431  lumisections, 0.5, lumisections + 0.5,
433  " ");
434  allocated_byls_.setXTitle("lumisection");
435  allocated_byls_.setYTitle("memory [kB]");
436 
438  name + " deallocated_byls",
439  title + " deallocated memory vs. lumisection",
440  lumisections, 0.5, lumisections + 0.5,
442  " ");
443  deallocated_byls_.setXTitle("lumisection");
444  deallocated_byls_.setYTitle("memory [kB]");
445  }
446 }
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_
void setXTitle(std::string const &title)
void FastTimerService::PlotsPerElement::fill ( Resources const &  data,
unsigned int  lumisection 
)

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

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

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

481 {
482  // enable underflows and overflows in the computation of mean and rms
483  TH1::StatOverflows(true);
484 
485  if (time_thread_)
486  time_thread_.fill(ms(boost::chrono::nanoseconds(data.time_thread.load())));
487 
488  if (time_thread_byls_)
489  time_thread_byls_.fill(lumisection, ms(boost::chrono::nanoseconds(data.time_thread.load())));
490 
491  if (time_real_)
492  time_real_.fill(ms(boost::chrono::nanoseconds(data.time_real.load())));
493 
494  if (time_real_byls_)
495  time_real_byls_.fill(lumisection, ms(boost::chrono::nanoseconds(data.time_real.load())));
496 
497  if (allocated_)
498  allocated_.fill(kB(data.allocated));
499 
500  if (allocated_byls_)
501  allocated_byls_.fill(lumisection, kB(data.allocated));
502 
503  if (deallocated_)
504  deallocated_.fill(kB(data.deallocated));
505 
506  if (deallocated_byls_)
507  deallocated_byls_.fill(lumisection, kB(data.deallocated));
508 }
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 511 of file FastTimerService.cc.

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

512 {
513  // enable underflows and overflows in the computation of mean and rms
514  TH1::StatOverflows(true);
515 
516  float total;
517  float fraction;
518 
519  total = ms(data.time_thread);
520  fraction = (total > 0.) ? (ms(part.time_thread) / total) : 0.;
521  if (time_thread_)
522  time_thread_.fill(total, fraction);
523 
524  if (time_thread_byls_)
525  time_thread_byls_.fill(lumisection, total, fraction);
526 
527  total = ms(data.time_real);
528  fraction = (total > 0.) ? (ms(part.time_real) / total) : 0.;
529  if (time_real_)
530  time_real_.fill(total, fraction);
531 
532  if (time_real_byls_)
533  time_real_byls_.fill(lumisection, total, fraction);
534 
535  total = kB(data.allocated);
536  fraction = (total > 0.) ? (kB(part.allocated) / total) : 0.;
537  if (allocated_)
538  allocated_.fill(total, fraction);
539 
540  if (allocated_byls_)
541  allocated_byls_.fill(lumisection, total, fraction);
542 
543  total = kB(data.deallocated);
544  fraction = (total > 0.) ? (kB(part.deallocated) / total) : 0.;
545  if (deallocated_)
546  deallocated_.fill(total, fraction);
547 
548  if (deallocated_byls_)
549  deallocated_byls_.fill(lumisection, total, fraction);
550 }
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 336 of file FastTimerService.h.

ConcurrentMonitorElement FastTimerService::PlotsPerElement::allocated_byls_
private

Definition at line 337 of file FastTimerService.h.

ConcurrentMonitorElement FastTimerService::PlotsPerElement::deallocated_
private

Definition at line 338 of file FastTimerService.h.

ConcurrentMonitorElement FastTimerService::PlotsPerElement::deallocated_byls_
private

Definition at line 339 of file FastTimerService.h.

ConcurrentMonitorElement FastTimerService::PlotsPerElement::time_real_
private

Definition at line 334 of file FastTimerService.h.

ConcurrentMonitorElement FastTimerService::PlotsPerElement::time_real_byls_
private

Definition at line 335 of file FastTimerService.h.

ConcurrentMonitorElement FastTimerService::PlotsPerElement::time_thread_
private

Definition at line 332 of file FastTimerService.h.

ConcurrentMonitorElement FastTimerService::PlotsPerElement::time_thread_byls_
private

Definition at line 333 of file FastTimerService.h.