CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
FastTimerService Class Reference

#include <FastTimerService.h>

Classes

struct  GroupOfModules
 
struct  Measurement
 
class  PlotsPerElement
 
class  PlotsPerJob
 
class  PlotsPerPath
 
class  PlotsPerProcess
 
struct  Resources
 
struct  ResourcesPerJob
 
struct  ResourcesPerModule
 
struct  ResourcesPerPath
 
struct  ResourcesPerProcess
 

Public Member Functions

 FastTimerService (const edm::ParameterSet &, edm::ActivityRegistry &)
 
double queryEventTime (edm::StreamID) const
 
double queryEventTime (edm::StreamID, std::string const &process) const
 
double queryHighlightTime (edm::StreamID sid, std::string const &label) const
 
double queryModuleTime (edm::StreamID, const edm::ModuleDescription &module) const
 
double queryModuleTime (edm::StreamID, unsigned int id) const
 
double queryModuleTimeByLabel (edm::StreamID, std::string const &module) const
 
double queryModuleTimeByLabel (edm::StreamID, std::string const &process, const std::string &module) const
 
double queryPathTime (edm::StreamID, std::string const &path) const
 
double queryPathTime (edm::StreamID, std::string const &process, std::string const &path) const
 
double querySourceTime (edm::StreamID) const
 
 ~FastTimerService ()
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

void ignoredSignal (std::string signal) const
 
bool isFirstSubprocess (edm::StreamContext const &)
 
bool isFirstSubprocess (edm::GlobalContext const &)
 
bool isLastSubprocess (std::atomic< unsigned int > &check)
 
void postBeginJob ()
 
void postEndJob ()
 
void postEvent (edm::StreamContext const &)
 
void postEventReadFromSource (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void postGlobalBeginLumi (edm::GlobalContext const &)
 
void postGlobalBeginRun (edm::GlobalContext const &)
 
void postGlobalEndLumi (edm::GlobalContext const &)
 
void postGlobalEndRun (edm::GlobalContext const &)
 
void postModuleEvent (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void postModuleEventDelayedGet (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void postModuleEventPrefetching (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void postModuleGlobalBeginLumi (edm::GlobalContext const &, edm::ModuleCallingContext const &)
 
void postModuleGlobalBeginRun (edm::GlobalContext const &, edm::ModuleCallingContext const &)
 
void postModuleGlobalEndLumi (edm::GlobalContext const &, edm::ModuleCallingContext const &)
 
void postModuleGlobalEndRun (edm::GlobalContext const &, edm::ModuleCallingContext const &)
 
void postModuleStreamBeginLumi (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void postModuleStreamBeginRun (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void postModuleStreamEndLumi (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void postModuleStreamEndRun (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void postPathEvent (edm::StreamContext const &, edm::PathContext const &, edm::HLTPathStatus const &)
 
void postSourceEvent (edm::StreamID)
 
void postSourceLumi ()
 
void postSourceRun ()
 
void postStreamBeginLumi (edm::StreamContext const &)
 
void postStreamBeginRun (edm::StreamContext const &)
 
void postStreamEndLumi (edm::StreamContext const &)
 
void postStreamEndRun (edm::StreamContext const &)
 
void preallocate (edm::service::SystemBounds const &)
 
void preBeginJob (edm::PathsAndConsumesOfModulesBase const &, edm::ProcessContext const &)
 
void preEvent (edm::StreamContext const &)
 
void preEventReadFromSource (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void preGlobalBeginLumi (edm::GlobalContext const &)
 
void preGlobalBeginRun (edm::GlobalContext const &)
 
void preGlobalEndLumi (edm::GlobalContext const &)
 
void preGlobalEndRun (edm::GlobalContext const &)
 
void preModuleEvent (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void preModuleEventDelayedGet (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void preModuleEventPrefetching (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void preModuleGlobalBeginLumi (edm::GlobalContext const &, edm::ModuleCallingContext const &)
 
void preModuleGlobalBeginRun (edm::GlobalContext const &, edm::ModuleCallingContext const &)
 
void preModuleGlobalEndLumi (edm::GlobalContext const &, edm::ModuleCallingContext const &)
 
void preModuleGlobalEndRun (edm::GlobalContext const &, edm::ModuleCallingContext const &)
 
void preModuleStreamBeginLumi (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void preModuleStreamBeginRun (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void preModuleStreamEndLumi (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void preModuleStreamEndRun (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void prePathEvent (edm::StreamContext const &, edm::PathContext const &)
 
void preSourceConstruction (edm::ModuleDescription const &)
 
void preSourceEvent (edm::StreamID)
 
void preSourceLumi ()
 
void preSourceRun ()
 
void preStreamBeginLumi (edm::StreamContext const &)
 
void preStreamBeginRun (edm::StreamContext const &)
 
void preStreamEndLumi (edm::StreamContext const &)
 
void preStreamEndRun (edm::StreamContext const &)
 
template<typename T >
void printEvent (T &out, ResourcesPerJob const &) const
 
template<typename T >
void printSummary (T &out, ResourcesPerJob const &, std::string const &label) const
 
double queryModuleTime_ (edm::StreamID, unsigned int id) const
 
Measurementthread ()
 
void unsupportedSignal (std::string signal) const
 

Private Attributes

ProcessCallGraph callgraph_
 
unsigned int concurrent_runs_
 
unsigned int concurrent_streams_
 
unsigned int concurrent_threads_
 
const double dqm_eventtime_range_
 
const double dqm_eventtime_resolution_
 
const unsigned int dqm_lumisections_range_
 
const double dqm_moduletime_range_
 
const double dqm_moduletime_resolution_
 
std::string dqm_path_
 
const double dqm_pathtime_range_
 
const double dqm_pathtime_resolution_
 
bool enable_dqm_
 
const bool enable_dqm_byls_
 
const bool enable_dqm_bymodule_
 
const bool enable_dqm_bynproc_
 
std::vector< edm::ParameterSethighlight_module_psets_
 
std::vector< GroupOfModuleshighlight_modules_
 
ResourcesPerJob job_summary_
 
unsigned int module_id_
 
const bool print_event_summary_
 
const bool print_job_summary_
 
const bool print_run_summary_
 
std::vector< ResourcesPerJobrun_summary_
 
std::vector< PlotsPerJobstream_plots_
 
std::vector< ResourcesPerJobstreams_
 
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_event_check_
 
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_global_run_check_
 
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_lumisection_check_
 
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_run_check_
 
std::mutex summary_mutex_
 
tbb::enumerable_thread_specific< Measurement, tbb::cache_aligned_allocator< Measurement >, tbb::ets_key_per_instance > threads_
 
tbb::concurrent_unordered_set< std::string > unsupported_signals_
 

Detailed Description

Definition at line 82 of file FastTimerService.h.

Constructor & Destructor Documentation

FastTimerService::FastTimerService ( const edm::ParameterSet config,
edm::ActivityRegistry registry 
)

Definition at line 652 of file FastTimerService.cc.

References postBeginJob(), postEndJob(), postEvent(), postGlobalEndRun(), postModuleEvent(), postModuleEventDelayedGet(), postPathEvent(), postSourceEvent(), postStreamEndLumi(), postStreamEndRun(), preallocate(), preBeginJob(), preGlobalBeginRun(), preModuleEvent(), preModuleEventDelayedGet(), prePathEvent(), preSourceConstruction(), preSourceEvent(), preStreamBeginLumi(), preStreamBeginRun(), edm::ActivityRegistry::watchPostBeginJob(), edm::ActivityRegistry::watchPostEndJob(), edm::ActivityRegistry::watchPostEvent(), edm::ActivityRegistry::watchPostGlobalEndRun(), edm::ActivityRegistry::watchPostModuleEvent(), edm::ActivityRegistry::watchPostModuleEventDelayedGet(), edm::ActivityRegistry::watchPostPathEvent(), edm::ActivityRegistry::watchPostSourceEvent(), edm::ActivityRegistry::watchPostStreamEndLumi(), edm::ActivityRegistry::watchPostStreamEndRun(), edm::ActivityRegistry::watchPreallocate(), edm::ActivityRegistry::watchPreBeginJob(), edm::ActivityRegistry::watchPreGlobalBeginRun(), edm::ActivityRegistry::watchPreModuleEvent(), edm::ActivityRegistry::watchPreModuleEventDelayedGet(), edm::ActivityRegistry::watchPrePathEvent(), edm::ActivityRegistry::watchPreSourceConstruction(), edm::ActivityRegistry::watchPreSourceEvent(), edm::ActivityRegistry::watchPreStreamBeginLumi(), edm::ActivityRegistry::watchPreStreamBeginRun(), and ~FastTimerService().

652  :
653  // configuration
654  callgraph_(),
655  // job configuration
656  concurrent_runs_( 0 ),
657  concurrent_streams_( 0 ),
658  concurrent_threads_( 0 ),
659  print_event_summary_( config.getUntrackedParameter<bool>( "printEventSummary" ) ),
660  print_run_summary_( config.getUntrackedParameter<bool>( "printRunSummary" ) ),
661  print_job_summary_( config.getUntrackedParameter<bool>( "printJobSummary" ) ),
662  // dqm configuration
664  enable_dqm_( config.getUntrackedParameter<bool>( "enableDQM" ) ),
665  enable_dqm_bymodule_( config.getUntrackedParameter<bool>( "enableDQMbyModule" ) ),
666  enable_dqm_byls_( config.getUntrackedParameter<bool>( "enableDQMbyLumiSection" ) ),
667  enable_dqm_bynproc_( config.getUntrackedParameter<bool>( "enableDQMbyProcesses" ) ),
668  dqm_eventtime_range_( config.getUntrackedParameter<double>( "dqmTimeRange" ) ), // ms
669  dqm_eventtime_resolution_( config.getUntrackedParameter<double>( "dqmTimeResolution" ) ), // ms
670  dqm_pathtime_range_( config.getUntrackedParameter<double>( "dqmPathTimeRange" ) ), // ms
671  dqm_pathtime_resolution_( config.getUntrackedParameter<double>( "dqmPathTimeResolution" ) ), // ms
672  dqm_moduletime_range_( config.getUntrackedParameter<double>( "dqmModuleTimeRange" ) ), // ms
673  dqm_moduletime_resolution_( config.getUntrackedParameter<double>( "dqmModuleTimeResolution" ) ), // ms
674  dqm_lumisections_range_( config.getUntrackedParameter<unsigned int>( "dqmLumiSectionsRange" ) ),
675  dqm_path_( config.getUntrackedParameter<std::string>("dqmPath" ) ),
676  // highlight configuration
677  highlight_module_psets_( config.getUntrackedParameter<std::vector<edm::ParameterSet>>("highlightModules") ),
678  highlight_modules_( highlight_module_psets_.size()) // filled in postBeginJob()
679 {
683  registry.watchPostEndJob( this, & FastTimerService::postEndJob );
685 //registry.watchPostGlobalBeginRun( this, & FastTimerService::postGlobalBeginRun );
686 //registry.watchPreGlobalEndRun( this, & FastTimerService::preGlobalEndRun );
689 //registry.watchPostStreamBeginRun( this, & FastTimerService::postStreamBeginRun );
690 //registry.watchPreStreamEndRun( this, & FastTimerService::preStreamEndRun );
692 //registry.watchPreGlobalBeginLumi( this, & FastTimerService::preGlobalBeginLumi );
693 //registry.watchPostGlobalBeginLumi( this, & FastTimerService::postGlobalBeginLumi );
694 //registry.watchPreGlobalEndLumi( this, & FastTimerService::preGlobalEndLumi );
695 //registry.watchPostGlobalEndLumi( this, & FastTimerService::postGlobalEndLumi );
697 //registry.watchPostStreamBeginLumi( this, & FastTimerService::postStreamBeginLumi );
698 //registry.watchPreStreamEndLumi( this, & FastTimerService::preStreamEndLumi );
700 //registry.watchPreEvent( this, & FastTimerService::preEvent );
701  registry.watchPostEvent( this, & FastTimerService::postEvent );
705 //registry.watchPostSourceConstruction( this, & FastTimerService::postSourceConstruction);
706 //registry.watchPreSourceRun( this, & FastTimerService::preSourceRun );
707 //registry.watchPostSourceRun( this, & FastTimerService::postSourceRun );
708 //registry.watchPreSourceLumi( this, & FastTimerService::preSourceLumi );
709 //registry.watchPostSourceLumi( this, & FastTimerService::postSourceLumi );
712 //registry.watchPreModuleBeginJob( this, & FastTimerService::preModuleBeginJob );
713 //registry.watchPostModuleBeginJob( this, & FastTimerService::postModuleBeginJob );
714 //registry.watchPreModuleEndJob( this, & FastTimerService::preModuleEndJob );
715 //registry.watchPostModuleEndJob( this, & FastTimerService::postModuleEndJob );
716 //registry.watchPreModuleBeginStream( this, & FastTimerService::preModuleBeginStream );
717 //registry.watchPostModuleBeginStream( this, & FastTimerService::postModuleBeginStream );
718 //registry.watchPreModuleEndStream( this, & FastTimerService::preModuleEndStream );
719 //registry.watchPostModuleEndStream( this, & FastTimerService::postModuleEndStream );
720 //registry.watchPreModuleGlobalBeginRun( this, & FastTimerService::preModuleGlobalBeginRun );
721 //registry.watchPostModuleGlobalBeginRun( this, & FastTimerService::postModuleGlobalBeginRun );
722 //registry.watchPreModuleGlobalEndRun( this, & FastTimerService::preModuleGlobalEndRun );
723 //registry.watchPostModuleGlobalEndRun( this, & FastTimerService::postModuleGlobalEndRun );
724 //registry.watchPreModuleGlobalBeginLumi( this, & FastTimerService::preModuleGlobalBeginLumi );
725 //registry.watchPostModuleGlobalBeginLumi( this, & FastTimerService::postModuleGlobalBeginLumi );
726 //registry.watchPreModuleGlobalEndLumi( this, & FastTimerService::preModuleGlobalEndLumi );
727 //registry.watchPostModuleGlobalEndLumi( this, & FastTimerService::postModuleGlobalEndLumi );
728 //registry.watchPreModuleStreamBeginRun( this, & FastTimerService::preModuleStreamBeginRun );
729 //registry.watchPostModuleStreamBeginRun( this, & FastTimerService::postModuleStreamBeginRun );
730 //registry.watchPreModuleStreamEndRun( this, & FastTimerService::preModuleStreamEndRun );
731 //registry.watchPostModuleStreamEndRun( this, & FastTimerService::postModuleStreamEndRun );
732 //registry.watchPreModuleStreamBeginLumi( this, & FastTimerService::preModuleStreamBeginLumi );
733 //registry.watchPostModuleStreamBeginLumi( this, & FastTimerService::postModuleStreamBeginLumi );
734 //registry.watchPreModuleStreamEndLumi( this, & FastTimerService::preModuleStreamEndLumi );
735 //registry.watchPostModuleStreamEndLumi( this, & FastTimerService::postModuleStreamEndLumi );
736 //registry.watchPreModuleEventPrefetching( this, & FastTimerService::preModuleEventPrefetching );
737 //registry.watchPostModuleEventPrefetching( this, & FastTimerService::postModuleEventPrefetching );
742 //registry.watchPreEventReadFromSource( this, & FastTimerService::preEventReadFromSource );
743 //registry.watchPostEventReadFromSource( this, & FastTimerService::postEventReadFromSource );
744 }
void preGlobalBeginRun(edm::GlobalContext const &)
void preModuleEventDelayedGet(edm::StreamContext const &, edm::ModuleCallingContext const &)
const bool print_run_summary_
T getUntrackedParameter(std::string const &, T const &) const
void postStreamEndLumi(edm::StreamContext const &)
std::vector< edm::ParameterSet > highlight_module_psets_
const double dqm_pathtime_resolution_
void preBeginJob(edm::PathsAndConsumesOfModulesBase const &, edm::ProcessContext const &)
const double dqm_moduletime_range_
void watchPrePathEvent(PrePathEvent::slot_type const &iSlot)
void watchPreallocate(Preallocate::slot_type const &iSlot)
const double dqm_moduletime_resolution_
unsigned int concurrent_threads_
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
void postModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
std::vector< GroupOfModules > highlight_modules_
void watchPreModuleEvent(PreModuleEvent::slot_type const &iSlot)
const double dqm_eventtime_range_
void watchPostEvent(PostEvent::slot_type const &iSlot)
void watchPreSourceConstruction(PreSourceConstruction::slot_type const &iSlot)
const bool enable_dqm_bynproc_
unsigned int concurrent_runs_
void watchPostStreamEndLumi(PostStreamEndLumi::slot_type const &iSlot)
void watchPostPathEvent(PostPathEvent::slot_type const &iSlot)
void watchPostModuleEvent(PostModuleEvent::slot_type const &iSlot)
void watchPostSourceEvent(PostSourceEvent::slot_type const &iSlot)
void postPathEvent(edm::StreamContext const &, edm::PathContext const &, edm::HLTPathStatus const &)
const bool print_job_summary_
void prePathEvent(edm::StreamContext const &, edm::PathContext const &)
unsigned int module_id_
void watchPreModuleEventDelayedGet(PreModuleEventDelayedGet::slot_type const &iSlot)
void postEvent(edm::StreamContext const &)
void postGlobalEndRun(edm::GlobalContext const &)
const unsigned int dqm_lumisections_range_
void postStreamEndRun(edm::StreamContext const &)
void preModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
std::string dqm_path_
static constexpr unsigned int invalidID()
Returns a value identifying an invalid id (the max unsigned int value)
void watchPostStreamEndRun(PostStreamEndRun::slot_type const &iSlot)
const bool enable_dqm_bymodule_
void watchPreGlobalBeginRun(PreGlobalBeginRun::slot_type const &iSlot)
const double dqm_eventtime_resolution_
const bool enable_dqm_byls_
void postModuleEventDelayedGet(edm::StreamContext const &, edm::ModuleCallingContext const &)
const bool print_event_summary_
void watchPostModuleEventDelayedGet(PostModuleEventDelayedGet::slot_type const &iSlot)
void watchPostGlobalEndRun(PostGlobalEndRun::slot_type const &iSlot)
void preSourceEvent(edm::StreamID)
void watchPreStreamBeginLumi(PreStreamBeginLumi::slot_type const &iSlot)
void watchPreBeginJob(PreBeginJob::slot_type const &iSlot)
convenience function for attaching to signal
void preStreamBeginLumi(edm::StreamContext const &)
void postSourceEvent(edm::StreamID)
void watchPreStreamBeginRun(PreStreamBeginRun::slot_type const &iSlot)
void preSourceConstruction(edm::ModuleDescription const &)
void watchPreSourceEvent(PreSourceEvent::slot_type const &iSlot)
ProcessCallGraph callgraph_
void preStreamBeginRun(edm::StreamContext const &)
unsigned int concurrent_streams_
void preallocate(edm::service::SystemBounds const &)
const double dqm_pathtime_range_
void watchPostBeginJob(PostBeginJob::slot_type const &iSlot)
convenience function for attaching to signal
FastTimerService::~FastTimerService ( )
default

Referenced by FastTimerService().

Member Function Documentation

void FastTimerService::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 1600 of file FastTimerService.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::addOptionalNode(), edm::ParameterSetDescription::addUntracked(), edm::ParameterSetDescription::addVPSetUntracked(), edm::ParameterDescriptionNode::setComment(), and AlCaHLTBitMon_QueryRunRegistry::string.

1601 {
1603  desc.addUntracked<bool>( "printEventSummary", false);
1604  desc.addUntracked<bool>( "printRunSummary", true);
1605  desc.addUntracked<bool>( "printJobSummary", true);
1606  desc.addUntracked<bool>( "enableDQM", true);
1607  desc.addUntracked<bool>( "enableDQMbyModule", false);
1608  desc.addUntracked<bool>( "enableDQMbyLumiSection", false);
1609  desc.addUntracked<bool>( "enableDQMbyProcesses", false);
1610  desc.addUntracked<double>( "dqmTimeRange", 1000. ); // ms
1611  desc.addUntracked<double>( "dqmTimeResolution", 5. ); // ms
1612  desc.addUntracked<double>( "dqmPathTimeRange", 100. ); // ms
1613  desc.addUntracked<double>( "dqmPathTimeResolution", 0.5); // ms
1614  desc.addUntracked<double>( "dqmModuleTimeRange", 40. ); // ms
1615  desc.addUntracked<double>( "dqmModuleTimeResolution", 0.2); // ms
1616  desc.addUntracked<unsigned>( "dqmLumiSectionsRange", 2500 ); // ~ 16 hours
1617  desc.addUntracked<std::string>( "dqmPath", "HLT/TimerService");
1618 
1619  edm::ParameterSetDescription highlightModulesDescription;
1620  highlightModulesDescription.addUntracked<std::vector<std::string>>("modules", {});
1621  highlightModulesDescription.addUntracked<std::string>("label", "producers");
1622  desc.addVPSetUntracked("highlightModules", highlightModulesDescription, {});
1623 
1624  // # OBSOLETE - these parameters are ignored, they are left only not to break old configurations
1625  // they will not be printed in the generated cfi.py file
1626  desc.addOptionalNode(edm::ParameterDescription<bool>("useRealTimeClock", true, false), false)->setComment("This parameter is obsolete and will be ignored.");
1627  desc.addOptionalNode(edm::ParameterDescription<bool>("enableTimingPaths", true, false), false)->setComment("This parameter is obsolete and will be ignored.");
1628  desc.addOptionalNode(edm::ParameterDescription<bool>("enableTimingModules", true, false), false)->setComment("This parameter is obsolete and will be ignored.");
1629  desc.addOptionalNode(edm::ParameterDescription<bool>("enableTimingExclusive", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1630  desc.addOptionalNode(edm::ParameterDescription<bool>("enableTimingSummary", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1631  desc.addOptionalNode(edm::ParameterDescription<bool>("skipFirstPath", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1632  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathActive", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1633  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathTotal", true, false), false)->setComment("This parameter is obsolete and will be ignored.");
1634  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathOverhead", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1635  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathDetails", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1636  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathCounters", true, false), false)->setComment("This parameter is obsolete and will be ignored.");
1637  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathExclusive", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1638  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyModuleType", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1639  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMSummary", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1640 
1641  descriptions.add("FastTimerService", desc);
1642 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void FastTimerService::ignoredSignal ( std::string  signal) const
private
bool FastTimerService::isFirstSubprocess ( edm::StreamContext const &  sc)
private

Definition at line 1309 of file FastTimerService.cc.

References edm::ProcessContext::isSubProcess(), and edm::StreamContext::processContext().

Referenced by preGlobalBeginRun(), preStreamBeginLumi(), and preStreamBeginRun().

1310 {
1311  return (not sc.processContext()->isSubProcess());
1312 }
bool FastTimerService::isFirstSubprocess ( edm::GlobalContext const &  gc)
private

Definition at line 1315 of file FastTimerService.cc.

References edm::ProcessContext::isSubProcess(), and edm::GlobalContext::processContext().

1316 {
1317  return (not gc.processContext()->isSubProcess());
1318 }
bool FastTimerService::isLastSubprocess ( std::atomic< unsigned int > &  check)
private

Definition at line 1322 of file FastTimerService.cc.

References callgraph_, and ProcessCallGraph::processes().

Referenced by postEvent(), postGlobalEndRun(), postStreamEndLumi(), and postStreamEndRun().

1323 {
1324  // release-acquire semantic guarantees that all writes in this and other threads are visible
1325  // after this operation; full sequentially-consistent ordering is (probably) not needed.
1326  unsigned int old_value = check.fetch_add(1, std::memory_order_acq_rel);
1327  return (old_value == callgraph_.processes().size() - 1);
1328 }
std::vector< ProcessType > const & processes() const
def check(config)
Definition: trackerTree.py:14
ProcessCallGraph callgraph_
void FastTimerService::postBeginJob ( )
private

Definition at line 974 of file FastTimerService.cc.

References callgraph_, concurrent_runs_, concurrent_streams_, enable_dqm_, edmIntegrityCheck::group, highlight_module_psets_, highlight_modules_, mps_fire::i, job_summary_, diffTwoXMLs::label, tablePrinter::labels, ProcessCallGraph::module(), edm::ModuleDescription::moduleLabel(), ErrorSummaryFilter_cfi::modules, run_summary_, ProcessCallGraph::size(), stream_plots_, streams_, AlCaHLTBitMon_QueryRunRegistry::string, and groupFilesInBlocks::temp.

Referenced by FastTimerService().

974  {
975  unsigned int modules = callgraph_.size();
976 
977  // module highlights
978  for (unsigned int group: boost::irange(0ul, highlight_module_psets_.size())) {
979  // copy and sort for faster search via std::binary_search
980  auto labels = highlight_module_psets_[group].getUntrackedParameter<std::vector<std::string>>("modules");
981  std::sort(labels.begin(), labels.end());
982 
983  highlight_modules_[group].label = highlight_module_psets_[group].getUntrackedParameter<std::string>("label");
984  highlight_modules_[group].modules.reserve(labels.size());
985  // convert the module labels in module ids
986  for (unsigned int i = 0; i < modules; ++i) {
987  auto const & label = callgraph_.module(i).moduleLabel();
988  if (std::binary_search(labels.begin(), labels.end(), label))
989  highlight_modules_[group].modules.push_back(i);
990  }
991  }
992  highlight_module_psets_.clear();
993 
994  // allocate the resource counters for each stream, process, path and module
995  ResourcesPerJob temp(callgraph_, highlight_modules_);
998  job_summary_ = temp;
999 
1000  // check that the DQMStore service is available
1001  if (enable_dqm_ and not edm::Service<DQMStore>().isAvailable()) {
1002  // the DQMStore is not available, disable all DQM plots
1003  enable_dqm_ = false;
1004  // FIXME issue a LogWarning ?
1005  }
1006 
1007  // allocate the structures to hold pointers to the DQM plots
1008  if (enable_dqm_)
1010 
1011 }
std::vector< edm::ParameterSet > highlight_module_psets_
std::vector< GroupOfModules > highlight_modules_
ResourcesPerJob job_summary_
unsigned int concurrent_runs_
std::vector< ResourcesPerJob > streams_
std::string const & moduleLabel() const
std::vector< PlotsPerJob > stream_plots_
std::vector< ResourcesPerJob > run_summary_
unsigned int size() const
edm::ModuleDescription const & module(unsigned int module) const
ProcessCallGraph callgraph_
unsigned int concurrent_streams_
void FastTimerService::postEndJob ( )
private

Definition at line 1146 of file FastTimerService.cc.

References job_summary_, MillePedeFileConverter_cfg::out, print_job_summary_, and printSummary().

Referenced by FastTimerService().

1147 {
1148  if (print_job_summary_) {
1149  edm::LogVerbatim out("FastReport");
1150  printSummary(out, job_summary_, "Job");
1151  }
1152 }
ResourcesPerJob job_summary_
const bool print_job_summary_
void printSummary(T &out, ResourcesPerJob const &, std::string const &label) const
void FastTimerService::postEvent ( edm::StreamContext const &  sc)
private

Definition at line 1337 of file FastTimerService.cc.

References callgraph_, data, enable_dqm_, edm::StreamContext::eventID(), edmIntegrityCheck::group, highlight_modules_, mps_fire::i, ignoredSignal(), isLastSubprocess(), job_summary_, plotBeamSpotDB::last, edm::EventID::luminosityBlock(), MillePedeFileConverter_cfg::out, sysUtil::pid, print_event_summary_, printEvent(), LaserDQM_cfg::process, edm::StreamContext::processContext(), ProcessCallGraph::processDescription(), ProcessCallGraph::processId(), run_summary_, edm::StreamContext::runIndex(), stream_plots_, edm::StreamContext::streamID(), streams_, subprocess_event_check_, and summary_mutex_.

Referenced by FastTimerService().

1338 {
1339  ignoredSignal(__func__);
1340 
1341  unsigned int pid = callgraph_.processId(* sc.processContext());
1342  unsigned int sid = sc.streamID();
1343  auto & stream = streams_[sid];
1344  auto & process = callgraph_.processDescription(pid);
1345 
1346  // compute the event timing as the sum of all modules' timing
1347  auto & data = stream.processes[pid].total;
1348  for (unsigned int i: process.modules_)
1349  data += stream.modules[i].total;
1350  stream.total += data;
1351 
1352  // handle the summaries and fill the plots only after the last subprocess has run
1354  if (not last)
1355  return;
1356 
1357  // highlighted modules
1358  for (unsigned int group: boost::irange(0ul, highlight_modules_.size()))
1359  for (unsigned int i: highlight_modules_[group].modules)
1360  stream.highlight[group] += stream.modules[i].total;
1361 
1362  // avoid concurrent access to the summary objects
1363  {
1364  std::lock_guard<std::mutex> guard(summary_mutex_);
1365  job_summary_ += stream;
1366  run_summary_[sc.runIndex()] += stream;
1367  }
1368 
1369  if (print_event_summary_) {
1370  edm::LogVerbatim out("FastReport");
1371  printEvent(out, stream);
1372  }
1373 
1374  if (enable_dqm_)
1375  stream_plots_[sid].fill(callgraph_, stream, sc.eventID().luminosityBlock());
1376 }
std::vector< GroupOfModules > highlight_modules_
ResourcesPerJob job_summary_
unsigned int processId(edm::ProcessContext const &) const
std::vector< ResourcesPerJob > streams_
void printEvent(T &out, ResourcesPerJob const &) const
std::mutex summary_mutex_
std::vector< PlotsPerJob > stream_plots_
std::vector< ResourcesPerJob > run_summary_
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_event_check_
ProcessType const & processDescription(unsigned int) const
const bool print_event_summary_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
void ignoredSignal(std::string signal) const
ProcessCallGraph callgraph_
bool isLastSubprocess(std::atomic< unsigned int > &check)
void FastTimerService::postEventReadFromSource ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1489 of file FastTimerService.cc.

References ignoredSignal().

1490 {
1491  ignoredSignal(__func__);
1492 }
void ignoredSignal(std::string signal) const
void FastTimerService::postGlobalBeginLumi ( edm::GlobalContext const &  )
private

Definition at line 1047 of file FastTimerService.cc.

References ignoredSignal().

1048 {
1049  ignoredSignal(__func__);
1050 }
void ignoredSignal(std::string signal) const
void FastTimerService::postGlobalBeginRun ( edm::GlobalContext const &  )
private

Definition at line 893 of file FastTimerService.cc.

References ignoredSignal().

894 {
895  ignoredSignal(__func__);
896 }
void ignoredSignal(std::string signal) const
void FastTimerService::postGlobalEndLumi ( edm::GlobalContext const &  )
private

Definition at line 1059 of file FastTimerService.cc.

References ignoredSignal().

1060 {
1061  ignoredSignal(__func__);
1062 }
void ignoredSignal(std::string signal) const
void FastTimerService::postGlobalEndRun ( edm::GlobalContext const &  gc)
private

Definition at line 1109 of file FastTimerService.cc.

References ignoredSignal(), isLastSubprocess(), plotBeamSpotDB::last, MillePedeFileConverter_cfg::out, print_run_summary_, printSummary(), run_summary_, edm::GlobalContext::runIndex(), and subprocess_global_run_check_.

Referenced by FastTimerService().

1110 {
1111  ignoredSignal(__func__);
1112 
1113  // handle the summaries only after the last subprocess has run
1114  bool last = isLastSubprocess(subprocess_global_run_check_[gc.runIndex()]);
1115  if (print_run_summary_ and last) {
1116  edm::LogVerbatim out("FastReport");
1117  printSummary(out, run_summary_[gc.runIndex()], "Run");
1118  }
1119 }
const bool print_run_summary_
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_global_run_check_
void printSummary(T &out, ResourcesPerJob const &, std::string const &label) const
std::vector< ResourcesPerJob > run_summary_
void ignoredSignal(std::string signal) const
bool isLastSubprocess(std::atomic< unsigned int > &check)
void FastTimerService::postModuleEvent ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1447 of file FastTimerService.cc.

References hcalTTPDigis_cfi::id, edm::ModuleDescription::id(), FastTimerService::Measurement::measure_and_store(), edm::ModuleCallingContext::moduleDescription(), edm::StreamContext::streamID(), streams_, thread(), and edm::StreamID::value().

Referenced by FastTimerService().

1448 {
1449  edm::ModuleDescription const& md = * mcc.moduleDescription();
1450  unsigned int id = md.id();
1451  unsigned int sid = sc.streamID().value();
1452  auto & stream = streams_[sid];
1453 
1454  thread().measure_and_store(stream.modules[id].total);
1455  ++stream.modules[id].events;
1456 }
std::vector< ResourcesPerJob > streams_
Measurement & thread()
void measure_and_store(Resources &store)
unsigned int id() const
void FastTimerService::postModuleEventDelayedGet ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1465 of file FastTimerService.cc.

References unsupportedSignal().

Referenced by FastTimerService().

1466 {
1467  unsupportedSignal(__func__);
1468 }
void unsupportedSignal(std::string signal) const
void FastTimerService::postModuleEventPrefetching ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1477 of file FastTimerService.cc.

References ignoredSignal().

1478 {
1479  ignoredSignal(__func__);
1480 }
void ignoredSignal(std::string signal) const
void FastTimerService::postModuleGlobalBeginLumi ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1525 of file FastTimerService.cc.

References ignoredSignal().

1526 {
1527  ignoredSignal(__func__);
1528 }
void ignoredSignal(std::string signal) const
void FastTimerService::postModuleGlobalBeginRun ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1501 of file FastTimerService.cc.

References ignoredSignal().

1502 {
1503  ignoredSignal(__func__);
1504 }
void ignoredSignal(std::string signal) const
void FastTimerService::postModuleGlobalEndLumi ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1537 of file FastTimerService.cc.

References ignoredSignal().

1538 {
1539  ignoredSignal(__func__);
1540 }
void ignoredSignal(std::string signal) const
void FastTimerService::postModuleGlobalEndRun ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1513 of file FastTimerService.cc.

References ignoredSignal().

1514 {
1515  ignoredSignal(__func__);
1516 }
void ignoredSignal(std::string signal) const
void FastTimerService::postModuleStreamBeginLumi ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1573 of file FastTimerService.cc.

References ignoredSignal().

1574 {
1575  ignoredSignal(__func__);
1576 }
void ignoredSignal(std::string signal) const
void FastTimerService::postModuleStreamBeginRun ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1549 of file FastTimerService.cc.

References ignoredSignal().

1550 {
1551  ignoredSignal(__func__);
1552 }
void ignoredSignal(std::string signal) const
void FastTimerService::postModuleStreamEndLumi ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1585 of file FastTimerService.cc.

References ignoredSignal().

1586 {
1587  ignoredSignal(__func__);
1588 }
void ignoredSignal(std::string signal) const
void FastTimerService::postModuleStreamEndRun ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1561 of file FastTimerService.cc.

References ignoredSignal().

1562 {
1563  ignoredSignal(__func__);
1564 }
void ignoredSignal(std::string signal) const
void FastTimerService::postPathEvent ( edm::StreamContext const &  sc,
edm::PathContext const &  pc,
edm::HLTPathStatus const &  status 
)
private

Definition at line 1418 of file FastTimerService.cc.

References callgraph_, data, ProcessCallGraph::ProcessType::endPaths_, mps_fire::i, hcalTTPDigis_cfi::id, edm::HLTPathStatus::index(), diffTreeTool::index, edm::PathContext::isEndPath(), callgraph::path, edm::PathContext::pathID(), ProcessCallGraph::ProcessType::paths_, sysUtil::pid, edm::StreamContext::processContext(), ProcessCallGraph::processDescription(), ProcessCallGraph::processId(), edm::StreamContext::streamID(), streams_, and edm::StreamID::value().

Referenced by FastTimerService().

1419 {
1420  unsigned int sid = sc.streamID().value();
1421  unsigned int pid = callgraph_.processId(* sc.processContext());
1422  unsigned int id = pc.pathID();
1423  auto & stream = streams_[sid];
1424  auto & data = pc.isEndPath() ? stream.processes[pid].endpaths[id] : stream.processes[pid].paths[id];
1425 
1426  auto const& path = pc.isEndPath() ? callgraph_.processDescription(pid).endPaths_[id] : callgraph_.processDescription(pid).paths_[id];
1427  unsigned int index = path.modules_on_path_.empty() ? 0 : status.index() + 1;
1428  data.last = path.modules_on_path_.empty() ? 0 : path.last_dependency_of_module_[status.index()];
1429 
1430  for (unsigned int i = 0; i < index; ++i) {
1431  auto const& module = stream.modules[path.modules_on_path_[i]];
1432  data.active += module.total;
1433  }
1434  for (unsigned int i = 0; i < data.last; ++i) {
1435  auto const& module = stream.modules[path.modules_and_dependencies_[i]];
1436  data.total += module.total;
1437  }
1438 }
unsigned int processId(edm::ProcessContext const &) const
std::vector< ResourcesPerJob > streams_
std::vector< PathType > paths_
ProcessType const & processDescription(unsigned int) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
std::vector< PathType > endPaths_
ProcessCallGraph callgraph_
Definition: vlib.h:208
void FastTimerService::postSourceEvent ( edm::StreamID  sid)
private

Definition at line 1393 of file FastTimerService.cc.

References callgraph_, hcalTTPDigis_cfi::id, edm::ModuleDescription::id(), FastTimerService::Measurement::measure_and_store(), ProcessCallGraph::source(), streams_, and thread().

Referenced by FastTimerService().

1394 {
1396  unsigned int id = md.id();
1397  auto & stream = streams_[sid];
1398 
1399  thread().measure_and_store(stream.modules[id].total);
1400  ++stream.modules[id].events;
1401 }
std::vector< ResourcesPerJob > streams_
edm::ModuleDescription const & source() const
Measurement & thread()
void measure_and_store(Resources &store)
ProcessCallGraph callgraph_
unsigned int id() const
void FastTimerService::postSourceLumi ( )
private

Definition at line 1140 of file FastTimerService.cc.

References ignoredSignal().

1141 {
1142  ignoredSignal(__func__);
1143 }
void ignoredSignal(std::string signal) const
void FastTimerService::postSourceRun ( )
private

Definition at line 1128 of file FastTimerService.cc.

References ignoredSignal().

1129 {
1130  ignoredSignal(__func__);
1131 }
void ignoredSignal(std::string signal) const
void FastTimerService::postStreamBeginLumi ( edm::StreamContext const &  sc)
private

Definition at line 1077 of file FastTimerService.cc.

References ignoredSignal().

1078 {
1079  ignoredSignal(__func__);
1080 }
void ignoredSignal(std::string signal) const
void FastTimerService::postStreamBeginRun ( edm::StreamContext const &  sc)
private

Definition at line 1014 of file FastTimerService.cc.

References ignoredSignal().

1015 {
1016  ignoredSignal(__func__);
1017 }
void ignoredSignal(std::string signal) const
void FastTimerService::postStreamEndLumi ( edm::StreamContext const &  sc)
private

Definition at line 1089 of file FastTimerService.cc.

References enable_dqm_, edm::StreamContext::eventID(), ignoredSignal(), isLastSubprocess(), plotBeamSpotDB::last, edm::EventID::luminosityBlock(), DQMStore::mergeAndResetMEsLuminositySummaryCache(), module_id_, edm::EventID::run(), edm::StreamContext::streamID(), subprocess_lumisection_check_, and edm::StreamID::value().

Referenced by FastTimerService().

1089  {
1090  ignoredSignal(__func__);
1091 
1092  unsigned int sid = sc.streamID().value();
1093 
1094  // merge plots only after the last subprocess has run
1096  if (enable_dqm_ and last) {
1097  DQMStore & store = * edm::Service<DQMStore>();
1098  store.mergeAndResetMEsLuminositySummaryCache(sc.eventID().run(),sc.eventID().luminosityBlock(),sid, module_id_);
1099  }
1100 }
unsigned int module_id_
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_lumisection_check_
void ignoredSignal(std::string signal) const
void mergeAndResetMEsLuminositySummaryCache(uint32_t run, uint32_t lumi, uint32_t streamId, uint32_t moduleId)
Definition: DQMStore.cc:434
bool isLastSubprocess(std::atomic< unsigned int > &check)
void FastTimerService::postStreamEndRun ( edm::StreamContext const &  sc)
private

Definition at line 1026 of file FastTimerService.cc.

References enable_dqm_, edm::StreamContext::eventID(), ignoredSignal(), isLastSubprocess(), plotBeamSpotDB::last, DQMStore::mergeAndResetMEsRunSummaryCache(), module_id_, edm::EventID::run(), edm::StreamContext::streamID(), subprocess_run_check_, and edm::StreamID::value().

Referenced by FastTimerService().

1027 {
1028  ignoredSignal(__func__);
1029 
1030  unsigned int sid = sc.streamID().value();
1031 
1032  // merge plots only after the last subprocess has run
1034  if (enable_dqm_ and last) {
1035  DQMStore & store = * edm::Service<DQMStore>();
1036  store.mergeAndResetMEsRunSummaryCache(sc.eventID().run(), sid, module_id_);
1037  }
1038 }
unsigned int module_id_
void mergeAndResetMEsRunSummaryCache(uint32_t run, uint32_t streamId, uint32_t moduleId)
Definition: DQMStore.cc:360
void ignoredSignal(std::string signal) const
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_run_check_
bool isLastSubprocess(std::atomic< unsigned int > &check)
void FastTimerService::preallocate ( edm::service::SystemBounds const &  bounds)
private

Definition at line 936 of file FastTimerService.cc.

References concurrent_runs_, concurrent_streams_, concurrent_threads_, dqm_path_, enable_dqm_bynproc_, cmsPerfStripChart::format, edm::ModuleDescription::getUniqueID(), mps_fire::i, edm::service::SystemBounds::maxNumberOfConcurrentRuns(), edm::service::SystemBounds::maxNumberOfStreams(), edm::service::SystemBounds::maxNumberOfThreads(), module_id_, harvestTrackValidationPlots::str, subprocess_event_check_, subprocess_global_run_check_, subprocess_lumisection_check_, and subprocess_run_check_.

Referenced by FastTimerService().

937 {
938  concurrent_runs_ = bounds.maxNumberOfConcurrentRuns();
939  concurrent_streams_ = bounds.maxNumberOfStreams();
940  concurrent_threads_ = bounds.maxNumberOfThreads();
941 
943  dqm_path_ += (boost::format("/Running %d processes") % concurrent_threads_).str();
944 
945  // allocate atomic variables to keep track of the completion of each step, process by process
946  subprocess_event_check_ = std::make_unique<std::atomic<unsigned int>[]>(concurrent_streams_);
947  for (unsigned int i = 0; i < concurrent_streams_; ++i)
949  subprocess_lumisection_check_ = std::make_unique<std::atomic<unsigned int>[]>(concurrent_streams_);
950  for (unsigned int i = 0; i < concurrent_streams_; ++i)
952  subprocess_run_check_ = std::make_unique<std::atomic<unsigned int>[]>(concurrent_streams_);
953  for (unsigned int i = 0; i < concurrent_streams_; ++i)
955  subprocess_global_run_check_ = std::make_unique<std::atomic<unsigned int>[]>(concurrent_streams_);
956  for (unsigned int i = 0; i < concurrent_runs_; ++i)
958 
959  // assign a pseudo module id to the FastTimerService
961 }
unsigned int concurrent_threads_
const bool enable_dqm_bynproc_
unsigned int concurrent_runs_
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_global_run_check_
static unsigned int getUniqueID()
Returns a unique id each time called. Intended to be passed to ModuleDescription&#39;s constructor&#39;s modI...
unsigned int module_id_
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_lumisection_check_
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_event_check_
std::string dqm_path_
format
Some error handling for the usage.
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_run_check_
unsigned int concurrent_streams_
void FastTimerService::preBeginJob ( edm::PathsAndConsumesOfModulesBase const &  pathsAndConsumes,
edm::ProcessContext const &  context 
)
private

Definition at line 969 of file FastTimerService.cc.

References callgraph_, and ProcessCallGraph::preBeginJob().

Referenced by FastTimerService().

969  {
970  callgraph_.preBeginJob(pathsAndConsumes, context);
971 }
void preBeginJob(edm::PathsAndConsumesOfModulesBase const &, edm::ProcessContext const &)
ProcessCallGraph callgraph_
void FastTimerService::preEvent ( edm::StreamContext const &  sc)
private

Definition at line 1331 of file FastTimerService.cc.

References ignoredSignal().

1332 {
1333  ignoredSignal(__func__);
1334 }
void ignoredSignal(std::string signal) const
void FastTimerService::preEventReadFromSource ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1483 of file FastTimerService.cc.

References ignoredSignal().

1484 {
1485  ignoredSignal(__func__);
1486 }
void ignoredSignal(std::string signal) const
void FastTimerService::preGlobalBeginLumi ( edm::GlobalContext const &  )
private

Definition at line 1041 of file FastTimerService.cc.

References ignoredSignal().

1042 {
1043  ignoredSignal(__func__);
1044 }
void ignoredSignal(std::string signal) const
void FastTimerService::preGlobalBeginRun ( edm::GlobalContext const &  gc)
private

Definition at line 881 of file FastTimerService.cc.

References ignoredSignal(), isFirstSubprocess(), run_summary_, edm::GlobalContext::runIndex(), and subprocess_global_run_check_.

Referenced by FastTimerService().

882 {
883  ignoredSignal(__func__);
884 
885  // reset the run counters only during the main process being run
886  if (isFirstSubprocess(gc)) {
887  subprocess_global_run_check_[gc.runIndex()] = 0;
888  run_summary_[gc.runIndex()].reset();
889  }
890 }
bool isFirstSubprocess(edm::StreamContext const &)
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_global_run_check_
std::vector< ResourcesPerJob > run_summary_
void ignoredSignal(std::string signal) const
void FastTimerService::preGlobalEndLumi ( edm::GlobalContext const &  )
private

Definition at line 1053 of file FastTimerService.cc.

References ignoredSignal().

1054 {
1055  ignoredSignal(__func__);
1056 }
void ignoredSignal(std::string signal) const
void FastTimerService::preGlobalEndRun ( edm::GlobalContext const &  )
private

Definition at line 1103 of file FastTimerService.cc.

References ignoredSignal().

1104 {
1105  ignoredSignal(__func__);
1106 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleEvent ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1441 of file FastTimerService.cc.

References FastTimerService::Measurement::measure(), and thread().

Referenced by FastTimerService().

1442 {
1443  thread().measure();
1444 }
Measurement & thread()
void FastTimerService::preModuleEventDelayedGet ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1459 of file FastTimerService.cc.

References unsupportedSignal().

Referenced by FastTimerService().

1460 {
1461  unsupportedSignal(__func__);
1462 }
void unsupportedSignal(std::string signal) const
void FastTimerService::preModuleEventPrefetching ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1471 of file FastTimerService.cc.

References ignoredSignal().

1472 {
1473  ignoredSignal(__func__);
1474 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleGlobalBeginLumi ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1519 of file FastTimerService.cc.

References ignoredSignal().

1520 {
1521  ignoredSignal(__func__);
1522 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleGlobalBeginRun ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1495 of file FastTimerService.cc.

References ignoredSignal().

1496 {
1497  ignoredSignal(__func__);
1498 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleGlobalEndLumi ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1531 of file FastTimerService.cc.

References ignoredSignal().

1532 {
1533  ignoredSignal(__func__);
1534 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleGlobalEndRun ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1507 of file FastTimerService.cc.

References ignoredSignal().

1508 {
1509  ignoredSignal(__func__);
1510 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleStreamBeginLumi ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1567 of file FastTimerService.cc.

References ignoredSignal().

1568 {
1569  ignoredSignal(__func__);
1570 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleStreamBeginRun ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1543 of file FastTimerService.cc.

References ignoredSignal().

1544 {
1545  ignoredSignal(__func__);
1546 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleStreamEndLumi ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1579 of file FastTimerService.cc.

References ignoredSignal().

1580 {
1581  ignoredSignal(__func__);
1582 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleStreamEndRun ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1555 of file FastTimerService.cc.

References ignoredSignal().

1556 {
1557  ignoredSignal(__func__);
1558 }
void ignoredSignal(std::string signal) const
void FastTimerService::prePathEvent ( edm::StreamContext const &  sc,
edm::PathContext const &  pc 
)
private

Definition at line 1405 of file FastTimerService.cc.

References callgraph_, data, hcalTTPDigis_cfi::id, edm::PathContext::isEndPath(), edm::PathContext::pathID(), sysUtil::pid, edm::StreamContext::processContext(), ProcessCallGraph::processId(), edm::StreamContext::streamID(), streams_, and edm::StreamID::value().

Referenced by FastTimerService().

1406 {
1407  unsigned int sid = sc.streamID().value();
1408  unsigned int pid = callgraph_.processId(* sc.processContext());
1409  unsigned int id = pc.pathID();
1410  auto & stream = streams_[sid];
1411  auto & data = pc.isEndPath() ? stream.processes[pid].endpaths[id] : stream.processes[pid].paths[id];
1412  data.status = false;
1413  data.last = 0;
1414 }
unsigned int processId(edm::ProcessContext const &) const
std::vector< ResourcesPerJob > streams_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
ProcessCallGraph callgraph_
void FastTimerService::preSourceConstruction ( edm::ModuleDescription const &  module)
private

Definition at line 964 of file FastTimerService.cc.

References callgraph_, and ProcessCallGraph::preSourceConstruction().

Referenced by FastTimerService().

964  {
966 }
void preSourceConstruction(edm::ModuleDescription const &)
ProcessCallGraph callgraph_
Definition: vlib.h:208
void FastTimerService::preSourceEvent ( edm::StreamID  sid)
private

Definition at line 1379 of file FastTimerService.cc.

References FastTimerService::Measurement::measure(), streams_, subprocess_event_check_, and thread().

Referenced by FastTimerService().

1380 {
1381  // clear the event counters
1382  auto & stream = streams_[sid];
1383  stream.reset();
1384  ++stream.events;
1385 
1386  subprocess_event_check_[sid] = 0;
1387 
1388  thread().measure();
1389 }
std::vector< ResourcesPerJob > streams_
Measurement & thread()
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_event_check_
void FastTimerService::preSourceLumi ( )
private

Definition at line 1134 of file FastTimerService.cc.

References ignoredSignal().

1135 {
1136  ignoredSignal(__func__);
1137 }
void ignoredSignal(std::string signal) const
void FastTimerService::preSourceRun ( )
private

Definition at line 1122 of file FastTimerService.cc.

References ignoredSignal().

1123 {
1124  ignoredSignal(__func__);
1125 }
void ignoredSignal(std::string signal) const
void FastTimerService::preStreamBeginLumi ( edm::StreamContext const &  sc)
private

Definition at line 1065 of file FastTimerService.cc.

References ignoredSignal(), isFirstSubprocess(), edm::StreamContext::streamID(), subprocess_lumisection_check_, and edm::StreamID::value().

Referenced by FastTimerService().

1066 {
1067  ignoredSignal(__func__);
1068 
1069  // reset counters only during the main process transition
1070  if (isFirstSubprocess(sc)) {
1071  unsigned int sid = sc.streamID().value();
1073  }
1074 }
bool isFirstSubprocess(edm::StreamContext const &)
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_lumisection_check_
void ignoredSignal(std::string signal) const
void FastTimerService::preStreamBeginRun ( edm::StreamContext const &  sc)
private

Definition at line 899 of file FastTimerService.cc.

References callgraph_, dqm_eventtime_range_, dqm_eventtime_resolution_, dqm_lumisections_range_, dqm_moduletime_range_, dqm_moduletime_resolution_, dqm_path_, dqm_pathtime_range_, dqm_pathtime_resolution_, enable_dqm_, enable_dqm_byls_, enable_dqm_bymodule_, edm::StreamContext::eventID(), highlight_modules_, ignoredSignal(), isFirstSubprocess(), module_id_, edm::EventID::run(), stream_plots_, edm::StreamContext::streamID(), subprocess_run_check_, and edm::StreamID::value().

Referenced by FastTimerService().

900 {
901  ignoredSignal(__func__);
902 
903  unsigned int sid = sc.streamID().value();
904 
905  // reset counters and book the DQM plots during the main process being run
906  if (isFirstSubprocess(sc)) {
907  subprocess_run_check_[sid] = 0;
908 
909  // book the DQM plots
910  if (enable_dqm_) {
911  // define a callback to book the MonitorElements
912  auto bookTransactionCallback = [&, this] (DQMStore::IBooker & booker)
913  {
914  booker.setCurrentFolder(dqm_path_);
915  stream_plots_[sid].book(booker, callgraph_,
926  };
927 
928  // book MonitorElements for this stream
929  edm::Service<DQMStore>()->bookTransaction(bookTransactionCallback, sc.eventID().run(), sid, module_id_);
930  }
931  }
932 }
const double dqm_pathtime_resolution_
const double dqm_moduletime_range_
const double dqm_moduletime_resolution_
std::vector< GroupOfModules > highlight_modules_
const double dqm_eventtime_range_
bool isFirstSubprocess(edm::StreamContext const &)
std::vector< PlotsPerJob > stream_plots_
unsigned int module_id_
const unsigned int dqm_lumisections_range_
std::string dqm_path_
const bool enable_dqm_bymodule_
const double dqm_eventtime_resolution_
const bool enable_dqm_byls_
void ignoredSignal(std::string signal) const
ProcessCallGraph callgraph_
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_run_check_
const double dqm_pathtime_range_
void FastTimerService::preStreamEndLumi ( edm::StreamContext const &  )
private

Definition at line 1083 of file FastTimerService.cc.

References ignoredSignal().

1084 {
1085  ignoredSignal(__func__);
1086 }
void ignoredSignal(std::string signal) const
void FastTimerService::preStreamEndRun ( edm::StreamContext const &  )
private

Definition at line 1020 of file FastTimerService.cc.

References ignoredSignal().

1021 {
1022  ignoredSignal(__func__);
1023 }
void ignoredSignal(std::string signal) const
template<typename T >
void FastTimerService::printEvent ( T out,
ResourcesPerJob const &  data 
) const
private

Definition at line 1157 of file FastTimerService.cc.

References callgraph_, cmsPerfStripChart::format, edmIntegrityCheck::group, FastTimerService::ResourcesPerJob::highlight, highlight_modules_, mps_fire::i, funct::m, ProcessCallGraph::module(), FastTimerService::ResourcesPerJob::modules, AnalysisDataFormats_SUSYBSMObjects::ms, dataset::name, AlCaHLTBitMon_ParallelJobs::p, callgraph::path, proc, ProcessCallGraph::processDescription(), ProcessCallGraph::processes(), FastTimerService::ResourcesPerJob::processes, source, ProcessCallGraph::source(), FastTimerService::Resources::time_real, FastTimerService::Resources::time_thread, and FastTimerService::ResourcesPerJob::total.

Referenced by postEvent().

1158 {
1159  out << "FastReport --------------------------- Event Summary ---------------------------\n";
1160  out << "FastReport CPU time Real time Modules\n";
1161  auto const& source_d = callgraph_.source();
1162  auto const& source = data.modules[source_d.id()];
1163  out << boost::format("FastReport %10.3f ms %10.3f ms %s\n") % ms(source.total.time_thread) % ms(source.total.time_real) % source_d.moduleLabel();
1164  for (unsigned int i = 0; i < callgraph_.processes().size(); ++i) {
1165  auto const& proc_d = callgraph_.processDescription(i);
1166  auto const& proc = data.processes[i];
1167  out << boost::format("FastReport %10.3f ms %10.3f ms process %s\n") % ms(proc.total.time_thread) % ms(proc.total.time_real) % proc_d.name_;
1168  for (unsigned int m: proc_d.modules_) {
1169  auto const& module_d = callgraph_.module(m);
1170  auto const& module = data.modules[m];
1171  out << boost::format("FastReport %10.3f ms %10.3f ms %s\n") % ms(module.total.time_thread) % ms(module.total.time_real) % module_d.moduleLabel();
1172  }
1173  }
1174  out << boost::format("FastReport %10.3f ms %10.3f ms total\n") % ms(data.total.time_thread) % ms(data.total.time_real);
1175  out << '\n';
1176  out << "FastReport CPU time Real time Processes and Paths\n";
1177  out << boost::format("FastReport %10.3f ms %10.3f ms %s\n") % ms(source.total.time_thread) % ms(source.total.time_real) % source_d.moduleLabel();
1178  for (unsigned int i = 0; i < callgraph_.processes().size(); ++i) {
1179  auto const& proc_d = callgraph_.processDescription(i);
1180  auto const& proc = data.processes[i];
1181  out << boost::format("FastReport %10.3f ms %10.3f ms process %s\n") % ms(proc.total.time_thread) % ms(proc.total.time_real) % proc_d.name_;
1182  for (unsigned int p = 0; p < proc.paths.size(); ++p) {
1183  auto const& name = proc_d.paths_[p].name_;
1184  auto const& path = proc.paths[p];
1185  out << boost::format("FastReport %10.3f ms %10.3f ms %s (only scheduled modules)\n") % ms(path.active.time_thread) % ms(path.active.time_real) % name;
1186  out << boost::format("FastReport %10.3f ms %10.3f ms %s (including dependencies)\n") % ms(path.total.time_thread) % ms(path.total.time_real) % name;
1187  }
1188  for (unsigned int p = 0; p < proc.endpaths.size(); ++p) {
1189  auto const& name = proc_d.endPaths_[p].name_;
1190  auto const& path = proc.endpaths[p];
1191  out << boost::format("FastReport %10.3f ms %10.3f ms %s (only scheduled modules)\n") % ms(path.active.time_thread) % ms(path.active.time_real) % name;
1192  out << boost::format("FastReport %10.3f ms %10.3f ms %s (including dependencies)\n") % ms(path.total.time_thread) % ms(path.total.time_real) % name;
1193  }
1194  }
1195  out << boost::format("FastReport %10.3f ms %10.3f ms total\n") % ms(data.total.time_thread) % ms(data.total.time_real);
1196  out << '\n';
1197  for (unsigned int group: boost::irange(0ul, highlight_modules_.size())) {
1198  out << "FastReport CPU time Real time Highlighted modules\n";
1199  for (unsigned int m: highlight_modules_[group].modules) {
1200  auto const& module_d = callgraph_.module(m);
1201  auto const& module = data.modules[m];
1202  out << boost::format("FastReport %10.3f ms %10.3f ms %s\n") % ms(module.total.time_thread) % ms(module.total.time_real) % module_d.moduleLabel();
1203  }
1204  out << boost::format("FastReport %10.3f ms %10.3f ms %s\n") % ms(data.highlight[group].time_thread) % ms(data.highlight[group].time_real) % highlight_modules_[group].label;
1205  out << '\n';
1206  }
1207 }
std::vector< GroupOfModules > highlight_modules_
TrainProcessor *const proc
Definition: MVATrainer.cc:101
edm::ModuleDescription const & source() const
std::vector< ProcessType > const & processes() const
ProcessType const & processDescription(unsigned int) const
format
Some error handling for the usage.
susybsm::MuonSegment ms
Definition: classes.h:31
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
edm::ModuleDescription const & module(unsigned int module) const
ProcessCallGraph callgraph_
Definition: vlib.h:208
static std::string const source
Definition: EdmProvDump.cc:43
template<typename T >
void FastTimerService::printSummary ( T out,
ResourcesPerJob const &  data,
std::string const &  label 
) const
private

Definition at line 1210 of file FastTimerService.cc.

References callgraph_, FastTimerService::ResourcesPerJob::events, cmsPerfStripChart::format, edmIntegrityCheck::group, FastTimerService::ResourcesPerJob::highlight, highlight_modules_, mps_fire::i, funct::m, ProcessCallGraph::module(), FastTimerService::ResourcesPerJob::modules, AnalysisDataFormats_SUSYBSMObjects::ms, dataset::name, AlCaHLTBitMon_ParallelJobs::p, callgraph::path, proc, ProcessCallGraph::processDescription(), ProcessCallGraph::processes(), FastTimerService::ResourcesPerJob::processes, source, ProcessCallGraph::source(), FastTimerService::Resources::time_real, FastTimerService::Resources::time_thread, and FastTimerService::ResourcesPerJob::total.

Referenced by postEndJob(), and postGlobalEndRun().

1211 {
1212  out << "FastReport ";
1213  if (label.size() < 60)
1214  for (unsigned int i = (60-label.size()) / 2; i > 0; --i)
1215  out << '-';
1216  out << ' ' << label << " Summary ";
1217  if (label.size() < 60)
1218  for (unsigned int i = (59-label.size()) / 2; i > 0; --i)
1219  out << '-';
1220  out << '\n';
1221  out << "FastReport CPU time avg. when run Real time avg. when run Modules\n";
1222  auto const& source_d = callgraph_.source();
1223  auto const& source = data.modules[source_d.id()];
1224  out << boost::format("FastReport %10.3f ms %10.3f ms %10.3f ms %10.3f ms %s\n")
1225  % (ms(source.total.time_thread) / data.events) % (ms(source.total.time_thread) / source.events)
1226  % (ms(source.total.time_real) / data.events) % (ms(source.total.time_real) / source.events)
1227  % source_d.moduleLabel();
1228  for (unsigned int i = 0; i < callgraph_.processes().size(); ++i) {
1229  auto const& proc_d = callgraph_.processDescription(i);
1230  auto const& proc = data.processes[i];
1231  out << boost::format("FastReport %10.3f ms %10.3f ms process %s\n")
1232  % (ms(proc.total.time_thread) / data.events)
1233  % (ms(proc.total.time_real) / data.events)
1234  % proc_d.name_;
1235  for (unsigned int m: proc_d.modules_) {
1236  auto const& module_d = callgraph_.module(m);
1237  auto const& module = data.modules[m];
1238  out << boost::format("FastReport %10.3f ms %10.3f ms %10.3f ms %10.3f ms %s\n")
1239  % (ms(module.total.time_thread) / data.events) % (ms(module.total.time_thread) / module.events)
1240  % (ms(module.total.time_real) / data.events) % (ms(module.total.time_real) / module.events)
1241  % module_d.moduleLabel();
1242  }
1243  }
1244  out << boost::format("FastReport %10.3f ms %10.3f ms total\n")
1245  % (ms(data.total.time_thread) / data.events)
1246  % (ms(data.total.time_real) / data.events);
1247  out << '\n';
1248  out << "FastReport CPU time Real time Processes and Paths\n";
1249  out << boost::format("FastReport %10.3f ms %10.3f ms %s\n")
1250  % (ms(source.total.time_thread) / data.events)
1251  % (ms(source.total.time_real) / data.events)
1252  % source_d.moduleLabel();
1253  for (unsigned int i = 0; i < callgraph_.processes().size(); ++i) {
1254  auto const& proc_d = callgraph_.processDescription(i);
1255  auto const& proc = data.processes[i];
1256  out << boost::format("FastReport %10.3f ms %10.3f ms process %s\n")
1257  % (ms(proc.total.time_thread) / data.events)
1258  % (ms(proc.total.time_real) / data.events)
1259  % proc_d.name_;
1260  for (unsigned int p = 0; p < proc.paths.size(); ++p) {
1261  auto const& name = proc_d.paths_[p].name_;
1262  auto const& path = proc.paths[p];
1263  out << boost::format("FastReport %10.3f ms %10.3f ms %s (only scheduled modules)\n")
1264  % (ms(path.active.time_thread) / data.events)
1265  % (ms(path.active.time_real) / data.events)
1266  % name;
1267  out << boost::format("FastReport %10.3f ms %10.3f ms %s (including dependencies)\n")
1268  % (ms(path.total.time_thread) / data.events)
1269  % (ms(path.total.time_real) / data.events)
1270  % name;
1271  }
1272  for (unsigned int p = 0; p < proc.endpaths.size(); ++p) {
1273  auto const& name = proc_d.endPaths_[p].name_;
1274  auto const& path = proc.endpaths[p];
1275  out << boost::format("FastReport %10.3f ms %10.3f ms %s (only scheduled modules)\n")
1276  % (ms(path.active.time_thread) / data.events)
1277  % (ms(path.active.time_real) / data.events)
1278  % name;
1279  out << boost::format("FastReport %10.3f ms %10.3f ms %s (including dependencies)\n")
1280  % (ms(path.total.time_thread) / data.events)
1281  % (ms(path.total.time_real) / data.events)
1282  % name;
1283  }
1284  }
1285  out << boost::format("FastReport %10.3f ms %10.3f ms total\n")
1286  % (ms(data.total.time_thread) / data.events)
1287  % (ms(data.total.time_real) / data.events);
1288  out << '\n';
1289  for (unsigned int group: boost::irange(0ul, highlight_modules_.size())) {
1290  out << "FastReport CPU time avg. when run Real time avg. when run Highlighted modules\n";
1291  for (unsigned int m: highlight_modules_[group].modules) {
1292  auto const& module_d = callgraph_.module(m);
1293  auto const& module = data.modules[m];
1294  out << boost::format("FastReport %10.3f ms %10.3f ms %10.3f ms %10.3f ms %s\n")
1295  % (ms(module.total.time_thread) / data.events) % (ms(module.total.time_thread) / module.events)
1296  % (ms(module.total.time_real) / data.events) % (ms(module.total.time_real) / module.events)
1297  % module_d.moduleLabel();
1298  }
1299  out << boost::format("FastReport %10.3f ms %10.3f ms %s\n")
1300  % (ms(data.highlight[group].time_thread) / data.events)
1301  % (ms(data.highlight[group].time_real) / data.events)
1302  % highlight_modules_[group].label;
1303  out << '\n';
1304  }
1305 }
std::vector< GroupOfModules > highlight_modules_
TrainProcessor *const proc
Definition: MVATrainer.cc:101
edm::ModuleDescription const & source() const
std::vector< ProcessType > const & processes() const
ProcessType const & processDescription(unsigned int) const
format
Some error handling for the usage.
susybsm::MuonSegment ms
Definition: classes.h:31
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
edm::ModuleDescription const & module(unsigned int module) const
ProcessCallGraph callgraph_
Definition: vlib.h:208
static std::string const source
Definition: EdmProvDump.cc:43
double FastTimerService::queryEventTime ( edm::StreamID  sid) const

Definition at line 764 of file FastTimerService.cc.

References AnalysisDataFormats_SUSYBSMObjects::ms, and streams_.

765 {
766  auto const& stream = streams_[sid];
767  return ms(stream.total.time_real);
768 }
std::vector< ResourcesPerJob > streams_
susybsm::MuonSegment ms
Definition: classes.h:31
double FastTimerService::queryEventTime ( edm::StreamID  sid,
std::string const &  process 
) const

Definition at line 771 of file FastTimerService.cc.

References callgraph_, AnalysisDataFormats_SUSYBSMObjects::ms, sysUtil::pid, ProcessCallGraph::processId(), and streams_.

772 {
773  unsigned int pid = callgraph_.processId(process);
774  auto const& stream = streams_[sid];
775  return ms(stream.processes[pid].total.time_real);
776 }
unsigned int processId(edm::ProcessContext const &) const
std::vector< ResourcesPerJob > streams_
susybsm::MuonSegment ms
Definition: classes.h:31
ProcessCallGraph callgraph_
double FastTimerService::queryHighlightTime ( edm::StreamID  sid,
std::string const &  label 
) const

Definition at line 853 of file FastTimerService.cc.

References edmIntegrityCheck::group, highlight_modules_, AnalysisDataFormats_SUSYBSMObjects::ms, and streams_.

854 {
855  auto const& stream = streams_[sid];
856  for (unsigned int group: boost::irange(0ul, highlight_modules_.size()))
858  return ms(stream.highlight[group].time_real);
859 
860  // FIXME issue a LogWarning, raise an exception, or return NaN
861  return 0.;
862 }
std::vector< GroupOfModules > highlight_modules_
std::vector< ResourcesPerJob > streams_
susybsm::MuonSegment ms
Definition: classes.h:31
double FastTimerService::queryModuleTime ( edm::StreamID  sid,
const edm::ModuleDescription module 
) const

Definition at line 779 of file FastTimerService.cc.

References edm::ModuleDescription::id(), and queryModuleTime_().

780 {
781  return queryModuleTime_(sid, md.id());
782 }
double queryModuleTime_(edm::StreamID, unsigned int id) const
double FastTimerService::queryModuleTime ( edm::StreamID  sid,
unsigned int  id 
) const

Definition at line 785 of file FastTimerService.cc.

References callgraph_, queryModuleTime_(), and ProcessCallGraph::size().

786 {
787  if (id < callgraph_.size())
788  return queryModuleTime_(sid, id);
789 
790  // FIXME issue a LogWarning, raise an exception, or return NaN
791  return 0.;
792 }
double queryModuleTime_(edm::StreamID, unsigned int id) const
unsigned int size() const
ProcessCallGraph callgraph_
double FastTimerService::queryModuleTime_ ( edm::StreamID  sid,
unsigned int  id 
) const
private

Definition at line 749 of file FastTimerService.cc.

References hcalTTPDigis_cfi::id, AnalysisDataFormats_SUSYBSMObjects::ms, and streams_.

Referenced by queryModuleTime(), queryModuleTimeByLabel(), and querySourceTime().

750 {
751  // private version, assume "id" is valid
752  auto const& stream = streams_[sid];
753  auto const& module = stream.modules[id];
754  return ms(module.total.time_real);
755 }
std::vector< ResourcesPerJob > streams_
susybsm::MuonSegment ms
Definition: classes.h:31
Definition: vlib.h:208
double FastTimerService::queryModuleTimeByLabel ( edm::StreamID  sid,
std::string const &  module 
) const

Definition at line 795 of file FastTimerService.cc.

References callgraph_, diffTwoXMLs::label, ProcessCallGraph::module(), edm::ModuleDescription::moduleLabel(), queryModuleTime_(), and ProcessCallGraph::size().

Referenced by IsoTrig::studyTiming().

796 {
797  for (unsigned int id: boost::irange(0u, callgraph_.size()))
798  if (callgraph_.module(id).moduleLabel() == label)
799  return queryModuleTime_(sid, id);
800 
801  // FIXME issue a LogWarning, raise an exception, or return NaN
802  return 0.;
803 }
double queryModuleTime_(edm::StreamID, unsigned int id) const
std::string const & moduleLabel() const
unsigned int size() const
edm::ModuleDescription const & module(unsigned int module) const
ProcessCallGraph callgraph_
double FastTimerService::queryModuleTimeByLabel ( edm::StreamID  sid,
std::string const &  process,
const std::string &  module 
) const

Definition at line 806 of file FastTimerService.cc.

References callgraph_, diffTwoXMLs::label, ProcessCallGraph::module(), edm::ModuleDescription::moduleLabel(), ProcessCallGraph::ProcessType::modules_, ProcessCallGraph::processDescription(), and queryModuleTime_().

807 {
808  for (unsigned int id: callgraph_.processDescription(process).modules_)
809  if (callgraph_.module(id).moduleLabel() == label)
810  return queryModuleTime_(sid, id);
811 
812  // FIXME issue a LogWarning, raise an exception, or return NaN
813  return 0.;
814 }
double queryModuleTime_(edm::StreamID, unsigned int id) const
std::string const & moduleLabel() const
ProcessType const & processDescription(unsigned int) const
edm::ModuleDescription const & module(unsigned int module) const
ProcessCallGraph callgraph_
std::vector< unsigned int > modules_
double FastTimerService::queryPathTime ( edm::StreamID  sid,
std::string const &  path 
) const

Definition at line 817 of file FastTimerService.cc.

References callgraph_, AnalysisDataFormats_SUSYBSMObjects::ms, sysUtil::pid, ProcessCallGraph::processDescription(), ProcessCallGraph::processes(), and streams_.

818 {
819  auto const& stream = streams_[sid];
820  for (unsigned int pid: boost::irange(0ul, callgraph_.processes().size()))
821  {
822  auto const& desc = callgraph_.processDescription(pid);
823  for (unsigned int id: boost::irange(0ul, desc.paths_.size()))
824  if (desc.paths_[id].name_ == path)
825  return ms(stream.processes[pid].paths[id].total.time_real);
826  for (unsigned int id: boost::irange(0ul, desc.endPaths_.size()))
827  if (desc.paths_[id].name_ == path)
828  return ms(stream.processes[pid].endpaths[id].total.time_real);
829  }
830 
831  // FIXME issue a LogWarning, raise an exception, or return NaN
832  return 0.;
833 }
std::vector< ResourcesPerJob > streams_
std::vector< ProcessType > const & processes() const
ProcessType const & processDescription(unsigned int) const
susybsm::MuonSegment ms
Definition: classes.h:31
ProcessCallGraph callgraph_
double FastTimerService::queryPathTime ( edm::StreamID  sid,
std::string const &  process,
std::string const &  path 
) const

Definition at line 836 of file FastTimerService.cc.

References callgraph_, AnalysisDataFormats_SUSYBSMObjects::ms, sysUtil::pid, ProcessCallGraph::processDescription(), ProcessCallGraph::processId(), and streams_.

837 {
838  auto const& stream = streams_[sid];
839  unsigned int pid = callgraph_.processId(process);
840  auto const& desc = callgraph_.processDescription(pid);
841  for (unsigned int id: boost::irange(0ul, desc.paths_.size()))
842  if (desc.paths_[id].name_ == path)
843  return ms(stream.processes[pid].paths[id].total.time_real);
844  for (unsigned int id: boost::irange(0ul, desc.endPaths_.size()))
845  if (desc.paths_[id].name_ == path)
846  return ms(stream.processes[pid].endpaths[id].total.time_real);
847 
848  // FIXME issue a LogWarning, raise an exception, or return NaN
849  return 0.;
850 }
unsigned int processId(edm::ProcessContext const &) const
std::vector< ResourcesPerJob > streams_
ProcessType const & processDescription(unsigned int) const
susybsm::MuonSegment ms
Definition: classes.h:31
ProcessCallGraph callgraph_
double FastTimerService::querySourceTime ( edm::StreamID  sid) const

Definition at line 758 of file FastTimerService.cc.

References callgraph_, edm::ModuleDescription::id(), queryModuleTime_(), and ProcessCallGraph::source().

759 {
760  return queryModuleTime_(sid, callgraph_.source().id());
761 }
double queryModuleTime_(edm::StreamID, unsigned int id) const
edm::ModuleDescription const & source() const
ProcessCallGraph callgraph_
unsigned int id() const
FastTimerService::Measurement & FastTimerService::thread ( )
private

Definition at line 1592 of file FastTimerService.cc.

References threads_.

Referenced by postModuleEvent(), postSourceEvent(), preModuleEvent(), and preSourceEvent().

1593 {
1594  return threads_.local();
1595 }
tbb::enumerable_thread_specific< Measurement, tbb::cache_aligned_allocator< Measurement >, tbb::ets_key_per_instance > threads_
void FastTimerService::unsupportedSignal ( std::string  signal) const
private

Definition at line 872 of file FastTimerService.cc.

References unsupported_signals_.

Referenced by postModuleEventDelayedGet(), and preModuleEventDelayedGet().

873 {
874  // warn about each signal only once per job
875  if (unsupported_signals_.insert(signal).second)
876  edm::LogWarning("FastTimerService") << "The FastTimerService received the unsupported signal \"" << signal << "\".\n"
877  << "Please report how to reproduce the issue to cms-hlt@cern.ch .";
878 }
tbb::concurrent_unordered_set< std::string > unsupported_signals_

Member Data Documentation

ProcessCallGraph FastTimerService::callgraph_
private
unsigned int FastTimerService::concurrent_runs_
private

Definition at line 418 of file FastTimerService.h.

Referenced by postBeginJob(), and preallocate().

unsigned int FastTimerService::concurrent_streams_
private

Definition at line 419 of file FastTimerService.h.

Referenced by postBeginJob(), and preallocate().

unsigned int FastTimerService::concurrent_threads_
private

Definition at line 420 of file FastTimerService.h.

Referenced by preallocate().

const double FastTimerService::dqm_eventtime_range_
private

Definition at line 435 of file FastTimerService.h.

Referenced by preStreamBeginRun().

const double FastTimerService::dqm_eventtime_resolution_
private

Definition at line 436 of file FastTimerService.h.

Referenced by preStreamBeginRun().

const unsigned int FastTimerService::dqm_lumisections_range_
private

Definition at line 441 of file FastTimerService.h.

Referenced by preStreamBeginRun().

const double FastTimerService::dqm_moduletime_range_
private

Definition at line 439 of file FastTimerService.h.

Referenced by preStreamBeginRun().

const double FastTimerService::dqm_moduletime_resolution_
private

Definition at line 440 of file FastTimerService.h.

Referenced by preStreamBeginRun().

std::string FastTimerService::dqm_path_
private

Definition at line 442 of file FastTimerService.h.

Referenced by preallocate(), and preStreamBeginRun().

const double FastTimerService::dqm_pathtime_range_
private

Definition at line 437 of file FastTimerService.h.

Referenced by preStreamBeginRun().

const double FastTimerService::dqm_pathtime_resolution_
private

Definition at line 438 of file FastTimerService.h.

Referenced by preStreamBeginRun().

bool FastTimerService::enable_dqm_
private
const bool FastTimerService::enable_dqm_byls_
private

Definition at line 432 of file FastTimerService.h.

Referenced by preStreamBeginRun().

const bool FastTimerService::enable_dqm_bymodule_
private

Definition at line 431 of file FastTimerService.h.

Referenced by preStreamBeginRun().

const bool FastTimerService::enable_dqm_bynproc_
private

Definition at line 433 of file FastTimerService.h.

Referenced by preallocate().

std::vector<edm::ParameterSet> FastTimerService::highlight_module_psets_
private

Definition at line 445 of file FastTimerService.h.

Referenced by postBeginJob().

std::vector<GroupOfModules> FastTimerService::highlight_modules_
private
ResourcesPerJob FastTimerService::job_summary_
private

Definition at line 400 of file FastTimerService.h.

Referenced by postBeginJob(), postEndJob(), and postEvent().

unsigned int FastTimerService::module_id_
private
const bool FastTimerService::print_event_summary_
private

Definition at line 423 of file FastTimerService.h.

Referenced by postEvent().

const bool FastTimerService::print_job_summary_
private

Definition at line 425 of file FastTimerService.h.

Referenced by postEndJob().

const bool FastTimerService::print_run_summary_
private

Definition at line 424 of file FastTimerService.h.

Referenced by postGlobalEndRun().

std::vector<ResourcesPerJob> FastTimerService::run_summary_
private

Definition at line 401 of file FastTimerService.h.

Referenced by postBeginJob(), postEvent(), postGlobalEndRun(), and preGlobalBeginRun().

std::vector<PlotsPerJob> FastTimerService::stream_plots_
private

Definition at line 397 of file FastTimerService.h.

Referenced by postBeginJob(), postEvent(), and preStreamBeginRun().

std::vector<ResourcesPerJob> FastTimerService::streams_
private
std::unique_ptr<std::atomic<unsigned int>[]> FastTimerService::subprocess_event_check_
private

Definition at line 409 of file FastTimerService.h.

Referenced by postEvent(), preallocate(), and preSourceEvent().

std::unique_ptr<std::atomic<unsigned int>[]> FastTimerService::subprocess_global_run_check_
private

Definition at line 412 of file FastTimerService.h.

Referenced by postGlobalEndRun(), preallocate(), and preGlobalBeginRun().

std::unique_ptr<std::atomic<unsigned int>[]> FastTimerService::subprocess_lumisection_check_
private

Definition at line 410 of file FastTimerService.h.

Referenced by postStreamEndLumi(), preallocate(), and preStreamBeginLumi().

std::unique_ptr<std::atomic<unsigned int>[]> FastTimerService::subprocess_run_check_
private

Definition at line 411 of file FastTimerService.h.

Referenced by postStreamEndRun(), preallocate(), and preStreamBeginRun().

std::mutex FastTimerService::summary_mutex_
private

Definition at line 402 of file FastTimerService.h.

Referenced by postEvent().

tbb::enumerable_thread_specific<Measurement, tbb::cache_aligned_allocator<Measurement>, tbb::ets_key_per_instance> FastTimerService::threads_
private

Definition at line 406 of file FastTimerService.h.

Referenced by thread().

tbb::concurrent_unordered_set<std::string> FastTimerService::unsupported_signals_
mutableprivate

Definition at line 449 of file FastTimerService.h.

Referenced by unsupportedSignal().