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
 
struct  PlotRanges
 
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 printEventHeader (T &out, std::string const &label) const
 
template<typename T >
void printEventLine (T &out, Resources const &data, std::string const &label) const
 
template<typename T >
void printHeader (T &out, std::string const &label) const
 
template<typename T >
void printSummary (T &out, ResourcesPerJob const &, std::string const &label) const
 
template<typename T >
void printSummaryHeader (T &out, std::string const &label, bool detaile) const
 
template<typename T >
void printSummaryLine (T &out, Resources const &data, uint64_t events, std::string const &label) const
 
template<typename T >
void printSummaryLine (T &out, Resources const &data, uint64_t events, uint64_t active, 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 PlotRanges dqm_event_ranges_
 
const unsigned int dqm_lumisections_range_
 
const PlotRanges dqm_module_ranges_
 
std::string dqm_path_
 
const PlotRanges dqm_path_ranges_
 
bool enable_dqm_
 
const bool enable_dqm_byls_
 
const bool enable_dqm_bymodule_
 
const bool enable_dqm_bynproc_
 
const bool enable_dqm_bypath_
 
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 83 of file FastTimerService.h.

Constructor & Destructor Documentation

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

Definition at line 781 of file FastTimerService.cc.

References dqm_lumisections_range_, dqm_module_ranges_, dqm_path_, dqm_path_ranges_, edm::ParameterSet::getUntrackedParameter(), highlight_module_psets_, highlight_modules_, postBeginJob(), postEndJob(), postEvent(), postGlobalEndRun(), postModuleEvent(), postModuleEventDelayedGet(), postPathEvent(), postSourceEvent(), postStreamEndLumi(), postStreamEndRun(), preallocate(), preBeginJob(), preGlobalBeginRun(), preModuleEvent(), preModuleEventDelayedGet(), prePathEvent(), preSourceConstruction(), preSourceEvent(), preStreamBeginLumi(), preStreamBeginRun(), PhysicsTools::registry, AlCaHLTBitMon_QueryRunRegistry::string, and ~FastTimerService().

781  :
782  // configuration
783  callgraph_(),
784  // job configuration
785  concurrent_runs_( 0 ),
786  concurrent_streams_( 0 ),
787  concurrent_threads_( 0 ),
788  print_event_summary_( config.getUntrackedParameter<bool>( "printEventSummary" ) ),
789  print_run_summary_( config.getUntrackedParameter<bool>( "printRunSummary" ) ),
790  print_job_summary_( config.getUntrackedParameter<bool>( "printJobSummary" ) ),
791  // dqm configuration
793  enable_dqm_( config.getUntrackedParameter<bool>( "enableDQM" ) ),
794  enable_dqm_bymodule_( config.getUntrackedParameter<bool>( "enableDQMbyModule" ) ),
795  enable_dqm_bypath_( config.getUntrackedParameter<bool>( "enableDQMbyPath" ) ),
796  enable_dqm_byls_( config.getUntrackedParameter<bool>( "enableDQMbyLumiSection" ) ),
797  enable_dqm_bynproc_( config.getUntrackedParameter<bool>( "enableDQMbyProcesses" ) ),
798  dqm_event_ranges_( { config.getUntrackedParameter<double>( "dqmTimeRange" ), // ms
799  config.getUntrackedParameter<double>( "dqmTimeResolution" ), // ms
800  config.getUntrackedParameter<double>( "dqmMemoryRange" ), // kB
801  config.getUntrackedParameter<double>( "dqmMemoryResolution" ) } ), // kB
802  dqm_path_ranges_( { config.getUntrackedParameter<double>( "dqmPathTimeRange" ), // ms
803  config.getUntrackedParameter<double>( "dqmPathTimeResolution" ), // ms
804  config.getUntrackedParameter<double>( "dqmPathMemoryRange" ), // kB
805  config.getUntrackedParameter<double>( "dqmPathMemoryResolution" ) } ), // kB
806  dqm_module_ranges_( { config.getUntrackedParameter<double>( "dqmModuleTimeRange" ), // ms
807  config.getUntrackedParameter<double>( "dqmModuleTimeResolution" ), // ms
808  config.getUntrackedParameter<double>( "dqmModuleMemoryRange" ), // kB
809  config.getUntrackedParameter<double>( "dqmModuleMemoryResolution") } ), // kB
810  dqm_lumisections_range_( config.getUntrackedParameter<unsigned int>( "dqmLumiSectionsRange" ) ),
811  dqm_path_( config.getUntrackedParameter<std::string>("dqmPath" ) ),
812  // highlight configuration
813  highlight_module_psets_( config.getUntrackedParameter<std::vector<edm::ParameterSet>>("highlightModules") ),
814  highlight_modules_( highlight_module_psets_.size()) // filled in postBeginJob()
815 {
819  registry.watchPostEndJob( this, & FastTimerService::postEndJob );
821 //registry.watchPostGlobalBeginRun( this, & FastTimerService::postGlobalBeginRun );
822 //registry.watchPreGlobalEndRun( this, & FastTimerService::preGlobalEndRun );
825 //registry.watchPostStreamBeginRun( this, & FastTimerService::postStreamBeginRun );
826 //registry.watchPreStreamEndRun( this, & FastTimerService::preStreamEndRun );
828 //registry.watchPreGlobalBeginLumi( this, & FastTimerService::preGlobalBeginLumi );
829 //registry.watchPostGlobalBeginLumi( this, & FastTimerService::postGlobalBeginLumi );
830 //registry.watchPreGlobalEndLumi( this, & FastTimerService::preGlobalEndLumi );
831 //registry.watchPostGlobalEndLumi( this, & FastTimerService::postGlobalEndLumi );
833 //registry.watchPostStreamBeginLumi( this, & FastTimerService::postStreamBeginLumi );
834 //registry.watchPreStreamEndLumi( this, & FastTimerService::preStreamEndLumi );
836 //registry.watchPreEvent( this, & FastTimerService::preEvent );
837  registry.watchPostEvent( this, & FastTimerService::postEvent );
841 //registry.watchPostSourceConstruction( this, & FastTimerService::postSourceConstruction);
842 //registry.watchPreSourceRun( this, & FastTimerService::preSourceRun );
843 //registry.watchPostSourceRun( this, & FastTimerService::postSourceRun );
844 //registry.watchPreSourceLumi( this, & FastTimerService::preSourceLumi );
845 //registry.watchPostSourceLumi( this, & FastTimerService::postSourceLumi );
848 //registry.watchPreModuleBeginJob( this, & FastTimerService::preModuleBeginJob );
849 //registry.watchPostModuleBeginJob( this, & FastTimerService::postModuleBeginJob );
850 //registry.watchPreModuleEndJob( this, & FastTimerService::preModuleEndJob );
851 //registry.watchPostModuleEndJob( this, & FastTimerService::postModuleEndJob );
852 //registry.watchPreModuleBeginStream( this, & FastTimerService::preModuleBeginStream );
853 //registry.watchPostModuleBeginStream( this, & FastTimerService::postModuleBeginStream );
854 //registry.watchPreModuleEndStream( this, & FastTimerService::preModuleEndStream );
855 //registry.watchPostModuleEndStream( this, & FastTimerService::postModuleEndStream );
856 //registry.watchPreModuleGlobalBeginRun( this, & FastTimerService::preModuleGlobalBeginRun );
857 //registry.watchPostModuleGlobalBeginRun( this, & FastTimerService::postModuleGlobalBeginRun );
858 //registry.watchPreModuleGlobalEndRun( this, & FastTimerService::preModuleGlobalEndRun );
859 //registry.watchPostModuleGlobalEndRun( this, & FastTimerService::postModuleGlobalEndRun );
860 //registry.watchPreModuleGlobalBeginLumi( this, & FastTimerService::preModuleGlobalBeginLumi );
861 //registry.watchPostModuleGlobalBeginLumi( this, & FastTimerService::postModuleGlobalBeginLumi );
862 //registry.watchPreModuleGlobalEndLumi( this, & FastTimerService::preModuleGlobalEndLumi );
863 //registry.watchPostModuleGlobalEndLumi( this, & FastTimerService::postModuleGlobalEndLumi );
864 //registry.watchPreModuleStreamBeginRun( this, & FastTimerService::preModuleStreamBeginRun );
865 //registry.watchPostModuleStreamBeginRun( this, & FastTimerService::postModuleStreamBeginRun );
866 //registry.watchPreModuleStreamEndRun( this, & FastTimerService::preModuleStreamEndRun );
867 //registry.watchPostModuleStreamEndRun( this, & FastTimerService::postModuleStreamEndRun );
868 //registry.watchPreModuleStreamBeginLumi( this, & FastTimerService::preModuleStreamBeginLumi );
869 //registry.watchPostModuleStreamBeginLumi( this, & FastTimerService::postModuleStreamBeginLumi );
870 //registry.watchPreModuleStreamEndLumi( this, & FastTimerService::preModuleStreamEndLumi );
871 //registry.watchPostModuleStreamEndLumi( this, & FastTimerService::postModuleStreamEndLumi );
872 //registry.watchPreModuleEventPrefetching( this, & FastTimerService::preModuleEventPrefetching );
873 //registry.watchPostModuleEventPrefetching( this, & FastTimerService::postModuleEventPrefetching );
878 //registry.watchPreEventReadFromSource( this, & FastTimerService::preEventReadFromSource );
879 //registry.watchPostEventReadFromSource( this, & FastTimerService::postEventReadFromSource );
880 }
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_
void preBeginJob(edm::PathsAndConsumesOfModulesBase const &, edm::ProcessContext const &)
void watchPrePathEvent(PrePathEvent::slot_type const &iSlot)
void watchPreallocate(Preallocate::slot_type const &iSlot)
unsigned int concurrent_threads_
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
const PlotRanges dqm_event_ranges_
void postModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
std::vector< GroupOfModules > highlight_modules_
void watchPreModuleEvent(PreModuleEvent::slot_type const &iSlot)
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_
const bool enable_dqm_bypath_
const PlotRanges dqm_path_ranges_
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 PlotRanges dqm_module_ranges_
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 &)
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 1753 of file FastTimerService.cc.

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

1754 {
1756  desc.addUntracked<bool>( "printEventSummary", false);
1757  desc.addUntracked<bool>( "printRunSummary", true);
1758  desc.addUntracked<bool>( "printJobSummary", true);
1759  desc.addUntracked<bool>( "enableDQM", true);
1760  desc.addUntracked<bool>( "enableDQMbyModule", false);
1761  desc.addUntracked<bool>( "enableDQMbyPath", false);
1762  desc.addUntracked<bool>( "enableDQMbyLumiSection", false);
1763  desc.addUntracked<bool>( "enableDQMbyProcesses", false);
1764  desc.addUntracked<double>( "dqmTimeRange", 1000. ); // ms
1765  desc.addUntracked<double>( "dqmTimeResolution", 5. ); // ms
1766  desc.addUntracked<double>( "dqmMemoryRange", 1000000. ); // kB
1767  desc.addUntracked<double>( "dqmMemoryResolution", 5000. ); // kB
1768  desc.addUntracked<double>( "dqmPathTimeRange", 100. ); // ms
1769  desc.addUntracked<double>( "dqmPathTimeResolution", 0.5); // ms
1770  desc.addUntracked<double>( "dqmPathMemoryRange", 1000000. ); // kB
1771  desc.addUntracked<double>( "dqmPathMemoryResolution", 5000. ); // kB
1772  desc.addUntracked<double>( "dqmModuleTimeRange", 40. ); // ms
1773  desc.addUntracked<double>( "dqmModuleTimeResolution", 0.2); // ms
1774  desc.addUntracked<double>( "dqmModuleMemoryRange", 100000. ); // kB
1775  desc.addUntracked<double>( "dqmModuleMemoryResolution", 500. ); // kB
1776  desc.addUntracked<unsigned>( "dqmLumiSectionsRange", 2500 ); // ~ 16 hours
1777  desc.addUntracked<std::string>( "dqmPath", "HLT/TimerService");
1778 
1779  edm::ParameterSetDescription highlightModulesDescription;
1780  highlightModulesDescription.addUntracked<std::vector<std::string>>("modules", {});
1781  highlightModulesDescription.addUntracked<std::string>("label", "producers");
1782  desc.addVPSetUntracked("highlightModules", highlightModulesDescription, {});
1783 
1784  // # OBSOLETE - these parameters are ignored, they are left only not to break old configurations
1785  // they will not be printed in the generated cfi.py file
1786  desc.addOptionalNode(edm::ParameterDescription<bool>("useRealTimeClock", true, false), false)->setComment("This parameter is obsolete and will be ignored.");
1787  desc.addOptionalNode(edm::ParameterDescription<bool>("enableTimingPaths", true, false), false)->setComment("This parameter is obsolete and will be ignored.");
1788  desc.addOptionalNode(edm::ParameterDescription<bool>("enableTimingModules", true, false), false)->setComment("This parameter is obsolete and will be ignored.");
1789  desc.addOptionalNode(edm::ParameterDescription<bool>("enableTimingExclusive", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1790  desc.addOptionalNode(edm::ParameterDescription<bool>("enableTimingSummary", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1791  desc.addOptionalNode(edm::ParameterDescription<bool>("skipFirstPath", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1792  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathActive", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1793  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathTotal", true, false), false)->setComment("This parameter is obsolete and will be ignored.");
1794  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathOverhead", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1795  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathDetails", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1796  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathCounters", true, false), false)->setComment("This parameter is obsolete and will be ignored.");
1797  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathExclusive", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1798  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyModuleType", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1799  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMSummary", false, false), false)->setComment("This parameter is obsolete and will be ignored.");
1800 
1801  descriptions.add("FastTimerService", desc);
1802 }
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 1462 of file FastTimerService.cc.

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

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

1463 {
1464  return (not sc.processContext()->isSubProcess());
1465 }
bool FastTimerService::isFirstSubprocess ( edm::GlobalContext const &  gc)
private

Definition at line 1468 of file FastTimerService.cc.

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

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

Definition at line 1475 of file FastTimerService.cc.

References callgraph_, and ProcessCallGraph::processes().

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

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

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

1108  {
1109  unsigned int modules = callgraph_.size();
1110 
1111  // module highlights
1112  for (unsigned int group: boost::irange(0ul, highlight_module_psets_.size())) {
1113  // copy and sort for faster search via std::binary_search
1114  auto labels = highlight_module_psets_[group].getUntrackedParameter<std::vector<std::string>>("modules");
1115  std::sort(labels.begin(), labels.end());
1116 
1117  highlight_modules_[group].label = highlight_module_psets_[group].getUntrackedParameter<std::string>("label");
1118  highlight_modules_[group].modules.reserve(labels.size());
1119  // convert the module labels in module ids
1120  for (unsigned int i = 0; i < modules; ++i) {
1121  auto const & label = callgraph_.module(i).moduleLabel();
1122  if (std::binary_search(labels.begin(), labels.end(), label))
1123  highlight_modules_[group].modules.push_back(i);
1124  }
1125  }
1126  highlight_module_psets_.clear();
1127 
1128  // allocate the resource counters for each stream, process, path and module
1129  ResourcesPerJob temp(callgraph_, highlight_modules_);
1132  job_summary_ = temp;
1133 
1134  // check that the DQMStore service is available
1135  if (enable_dqm_ and not edm::Service<DQMStore>().isAvailable()) {
1136  // the DQMStore is not available, disable all DQM plots
1137  enable_dqm_ = false;
1138  // FIXME issue a LogWarning ?
1139  }
1140 
1141  // allocate the structures to hold pointers to the DQM plots
1142  if (enable_dqm_)
1144 
1145 }
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 1280 of file FastTimerService.cc.

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

Referenced by FastTimerService().

1281 {
1282  if (print_job_summary_) {
1283  edm::LogVerbatim out("FastReport");
1284  printSummary(out, job_summary_, "Job");
1285  }
1286 }
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 1490 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().

1491 {
1492  ignoredSignal(__func__);
1493 
1494  unsigned int pid = callgraph_.processId(* sc.processContext());
1495  unsigned int sid = sc.streamID();
1496  auto & stream = streams_[sid];
1497  auto & process = callgraph_.processDescription(pid);
1498 
1499  // compute the event timing as the sum of all modules' timing
1500  auto & data = stream.processes[pid].total;
1501  for (unsigned int i: process.modules_)
1502  data += stream.modules[i].total;
1503  stream.total += data;
1504 
1505  // handle the summaries and fill the plots only after the last subprocess has run
1507  if (not last)
1508  return;
1509 
1510  // highlighted modules
1511  for (unsigned int group: boost::irange(0ul, highlight_modules_.size()))
1512  for (unsigned int i: highlight_modules_[group].modules)
1513  stream.highlight[group] += stream.modules[i].total;
1514 
1515  // avoid concurrent access to the summary objects
1516  {
1517  std::lock_guard<std::mutex> guard(summary_mutex_);
1518  job_summary_ += stream;
1519  run_summary_[sc.runIndex()] += stream;
1520  }
1521 
1522  if (print_event_summary_) {
1523  edm::LogVerbatim out("FastReport");
1524  printEvent(out, stream);
1525  }
1526 
1527  if (enable_dqm_)
1528  stream_plots_[sid].fill(callgraph_, stream, sc.eventID().luminosityBlock());
1529 }
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 1642 of file FastTimerService.cc.

References ignoredSignal().

1643 {
1644  ignoredSignal(__func__);
1645 }
void ignoredSignal(std::string signal) const
void FastTimerService::postGlobalBeginLumi ( edm::GlobalContext const &  )
private

Definition at line 1181 of file FastTimerService.cc.

References ignoredSignal().

1182 {
1183  ignoredSignal(__func__);
1184 }
void ignoredSignal(std::string signal) const
void FastTimerService::postGlobalBeginRun ( edm::GlobalContext const &  )
private

Definition at line 1029 of file FastTimerService.cc.

References ignoredSignal().

1030 {
1031  ignoredSignal(__func__);
1032 }
void ignoredSignal(std::string signal) const
void FastTimerService::postGlobalEndLumi ( edm::GlobalContext const &  )
private

Definition at line 1193 of file FastTimerService.cc.

References ignoredSignal().

1194 {
1195  ignoredSignal(__func__);
1196 }
void ignoredSignal(std::string signal) const
void FastTimerService::postGlobalEndRun ( edm::GlobalContext const &  gc)
private

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

1244 {
1245  ignoredSignal(__func__);
1246 
1247  // handle the summaries only after the last subprocess has run
1248  bool last = isLastSubprocess(subprocess_global_run_check_[gc.runIndex()]);
1249  if (print_run_summary_ and last) {
1250  edm::LogVerbatim out("FastReport");
1251  printSummary(out, run_summary_[gc.runIndex()], "Run");
1252  }
1253 }
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 1600 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().

1601 {
1602  edm::ModuleDescription const& md = * mcc.moduleDescription();
1603  unsigned int id = md.id();
1604  unsigned int sid = sc.streamID().value();
1605  auto & stream = streams_[sid];
1606 
1607  thread().measure_and_store(stream.modules[id].total);
1608  ++stream.modules[id].events;
1609 }
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 1618 of file FastTimerService.cc.

References unsupportedSignal().

Referenced by FastTimerService().

1619 {
1620  unsupportedSignal(__func__);
1621 }
void unsupportedSignal(std::string signal) const
void FastTimerService::postModuleEventPrefetching ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1630 of file FastTimerService.cc.

References ignoredSignal().

1631 {
1632  ignoredSignal(__func__);
1633 }
void ignoredSignal(std::string signal) const
void FastTimerService::postModuleGlobalBeginLumi ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1678 of file FastTimerService.cc.

References ignoredSignal().

1679 {
1680  ignoredSignal(__func__);
1681 }
void ignoredSignal(std::string signal) const
void FastTimerService::postModuleGlobalBeginRun ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1654 of file FastTimerService.cc.

References ignoredSignal().

1655 {
1656  ignoredSignal(__func__);
1657 }
void ignoredSignal(std::string signal) const
void FastTimerService::postModuleGlobalEndLumi ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1690 of file FastTimerService.cc.

References ignoredSignal().

1691 {
1692  ignoredSignal(__func__);
1693 }
void ignoredSignal(std::string signal) const
void FastTimerService::postModuleGlobalEndRun ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1666 of file FastTimerService.cc.

References ignoredSignal().

1667 {
1668  ignoredSignal(__func__);
1669 }
void ignoredSignal(std::string signal) const
void FastTimerService::postModuleStreamBeginLumi ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1726 of file FastTimerService.cc.

References ignoredSignal().

1727 {
1728  ignoredSignal(__func__);
1729 }
void ignoredSignal(std::string signal) const
void FastTimerService::postModuleStreamBeginRun ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1702 of file FastTimerService.cc.

References ignoredSignal().

1703 {
1704  ignoredSignal(__func__);
1705 }
void ignoredSignal(std::string signal) const
void FastTimerService::postModuleStreamEndLumi ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1738 of file FastTimerService.cc.

References ignoredSignal().

1739 {
1740  ignoredSignal(__func__);
1741 }
void ignoredSignal(std::string signal) const
void FastTimerService::postModuleStreamEndRun ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1714 of file FastTimerService.cc.

References ignoredSignal().

1715 {
1716  ignoredSignal(__func__);
1717 }
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 1571 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().

1572 {
1573  unsigned int sid = sc.streamID().value();
1574  unsigned int pid = callgraph_.processId(* sc.processContext());
1575  unsigned int id = pc.pathID();
1576  auto & stream = streams_[sid];
1577  auto & data = pc.isEndPath() ? stream.processes[pid].endpaths[id] : stream.processes[pid].paths[id];
1578 
1579  auto const& path = pc.isEndPath() ? callgraph_.processDescription(pid).endPaths_[id] : callgraph_.processDescription(pid).paths_[id];
1580  unsigned int index = path.modules_on_path_.empty() ? 0 : status.index() + 1;
1581  data.last = path.modules_on_path_.empty() ? 0 : path.last_dependency_of_module_[status.index()];
1582 
1583  for (unsigned int i = 0; i < index; ++i) {
1584  auto const& module = stream.modules[path.modules_on_path_[i]];
1585  data.active += module.total;
1586  }
1587  for (unsigned int i = 0; i < data.last; ++i) {
1588  auto const& module = stream.modules[path.modules_and_dependencies_[i]];
1589  data.total += module.total;
1590  }
1591 }
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 1546 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().

1547 {
1549  unsigned int id = md.id();
1550  auto & stream = streams_[sid];
1551 
1552  thread().measure_and_store(stream.modules[id].total);
1553  ++stream.modules[id].events;
1554 }
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 1274 of file FastTimerService.cc.

References ignoredSignal().

1275 {
1276  ignoredSignal(__func__);
1277 }
void ignoredSignal(std::string signal) const
void FastTimerService::postSourceRun ( )
private

Definition at line 1262 of file FastTimerService.cc.

References ignoredSignal().

1263 {
1264  ignoredSignal(__func__);
1265 }
void ignoredSignal(std::string signal) const
void FastTimerService::postStreamBeginLumi ( edm::StreamContext const &  sc)
private

Definition at line 1211 of file FastTimerService.cc.

References ignoredSignal().

1212 {
1213  ignoredSignal(__func__);
1214 }
void ignoredSignal(std::string signal) const
void FastTimerService::postStreamBeginRun ( edm::StreamContext const &  sc)
private

Definition at line 1148 of file FastTimerService.cc.

References ignoredSignal().

1149 {
1150  ignoredSignal(__func__);
1151 }
void ignoredSignal(std::string signal) const
void FastTimerService::postStreamEndLumi ( edm::StreamContext const &  sc)
private

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

1223  {
1224  ignoredSignal(__func__);
1225 
1226  unsigned int sid = sc.streamID().value();
1227 
1228  // merge plots only after the last subprocess has run
1230  if (enable_dqm_ and last) {
1231  DQMStore & store = * edm::Service<DQMStore>();
1232  store.mergeAndResetMEsLuminositySummaryCache(sc.eventID().run(),sc.eventID().luminosityBlock(),sid, module_id_);
1233  }
1234 }
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 1160 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().

1161 {
1162  ignoredSignal(__func__);
1163 
1164  unsigned int sid = sc.streamID().value();
1165 
1166  // merge plots only after the last subprocess has run
1168  if (enable_dqm_ and last) {
1169  DQMStore & store = * edm::Service<DQMStore>();
1170  store.mergeAndResetMEsRunSummaryCache(sc.eventID().run(), sid, module_id_);
1171  }
1172 }
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 1070 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().

1071 {
1072  concurrent_runs_ = bounds.maxNumberOfConcurrentRuns();
1073  concurrent_streams_ = bounds.maxNumberOfStreams();
1074  concurrent_threads_ = bounds.maxNumberOfThreads();
1075 
1076  if (enable_dqm_bynproc_)
1077  dqm_path_ += (boost::format("/Running %d processes") % concurrent_threads_).str();
1078 
1079  // allocate atomic variables to keep track of the completion of each step, process by process
1080  subprocess_event_check_ = std::make_unique<std::atomic<unsigned int>[]>(concurrent_streams_);
1081  for (unsigned int i = 0; i < concurrent_streams_; ++i)
1083  subprocess_lumisection_check_ = std::make_unique<std::atomic<unsigned int>[]>(concurrent_streams_);
1084  for (unsigned int i = 0; i < concurrent_streams_; ++i)
1086  subprocess_run_check_ = std::make_unique<std::atomic<unsigned int>[]>(concurrent_streams_);
1087  for (unsigned int i = 0; i < concurrent_streams_; ++i)
1088  subprocess_run_check_[i] = 0;
1089  subprocess_global_run_check_ = std::make_unique<std::atomic<unsigned int>[]>(concurrent_streams_);
1090  for (unsigned int i = 0; i < concurrent_runs_; ++i)
1092 
1093  // assign a pseudo module id to the FastTimerService
1095 }
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 1103 of file FastTimerService.cc.

References callgraph_, and ProcessCallGraph::preBeginJob().

Referenced by FastTimerService().

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

Definition at line 1484 of file FastTimerService.cc.

References ignoredSignal().

1485 {
1486  ignoredSignal(__func__);
1487 }
void ignoredSignal(std::string signal) const
void FastTimerService::preEventReadFromSource ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1636 of file FastTimerService.cc.

References ignoredSignal().

1637 {
1638  ignoredSignal(__func__);
1639 }
void ignoredSignal(std::string signal) const
void FastTimerService::preGlobalBeginLumi ( edm::GlobalContext const &  )
private

Definition at line 1175 of file FastTimerService.cc.

References ignoredSignal().

1176 {
1177  ignoredSignal(__func__);
1178 }
void ignoredSignal(std::string signal) const
void FastTimerService::preGlobalBeginRun ( edm::GlobalContext const &  gc)
private

Definition at line 1017 of file FastTimerService.cc.

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

Referenced by FastTimerService().

1018 {
1019  ignoredSignal(__func__);
1020 
1021  // reset the run counters only during the main process being run
1022  if (isFirstSubprocess(gc)) {
1023  subprocess_global_run_check_[gc.runIndex()] = 0;
1024  run_summary_[gc.runIndex()].reset();
1025  }
1026 }
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 1187 of file FastTimerService.cc.

References ignoredSignal().

1188 {
1189  ignoredSignal(__func__);
1190 }
void ignoredSignal(std::string signal) const
void FastTimerService::preGlobalEndRun ( edm::GlobalContext const &  )
private

Definition at line 1237 of file FastTimerService.cc.

References ignoredSignal().

1238 {
1239  ignoredSignal(__func__);
1240 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleEvent ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1594 of file FastTimerService.cc.

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

Referenced by FastTimerService().

1595 {
1596  thread().measure();
1597 }
Measurement & thread()
void FastTimerService::preModuleEventDelayedGet ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1612 of file FastTimerService.cc.

References unsupportedSignal().

Referenced by FastTimerService().

1613 {
1614  unsupportedSignal(__func__);
1615 }
void unsupportedSignal(std::string signal) const
void FastTimerService::preModuleEventPrefetching ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1624 of file FastTimerService.cc.

References ignoredSignal().

1625 {
1626  ignoredSignal(__func__);
1627 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleGlobalBeginLumi ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1672 of file FastTimerService.cc.

References ignoredSignal().

1673 {
1674  ignoredSignal(__func__);
1675 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleGlobalBeginRun ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1648 of file FastTimerService.cc.

References ignoredSignal().

1649 {
1650  ignoredSignal(__func__);
1651 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleGlobalEndLumi ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1684 of file FastTimerService.cc.

References ignoredSignal().

1685 {
1686  ignoredSignal(__func__);
1687 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleGlobalEndRun ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1660 of file FastTimerService.cc.

References ignoredSignal().

1661 {
1662  ignoredSignal(__func__);
1663 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleStreamBeginLumi ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1720 of file FastTimerService.cc.

References ignoredSignal().

1721 {
1722  ignoredSignal(__func__);
1723 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleStreamBeginRun ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1696 of file FastTimerService.cc.

References ignoredSignal().

1697 {
1698  ignoredSignal(__func__);
1699 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleStreamEndLumi ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1732 of file FastTimerService.cc.

References ignoredSignal().

1733 {
1734  ignoredSignal(__func__);
1735 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleStreamEndRun ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1708 of file FastTimerService.cc.

References ignoredSignal().

1709 {
1710  ignoredSignal(__func__);
1711 }
void ignoredSignal(std::string signal) const
void FastTimerService::prePathEvent ( edm::StreamContext const &  sc,
edm::PathContext const &  pc 
)
private

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

1559 {
1560  unsigned int sid = sc.streamID().value();
1561  unsigned int pid = callgraph_.processId(* sc.processContext());
1562  unsigned int id = pc.pathID();
1563  auto & stream = streams_[sid];
1564  auto & data = pc.isEndPath() ? stream.processes[pid].endpaths[id] : stream.processes[pid].paths[id];
1565  data.status = false;
1566  data.last = 0;
1567 }
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 1098 of file FastTimerService.cc.

References callgraph_, and ProcessCallGraph::preSourceConstruction().

Referenced by FastTimerService().

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

Definition at line 1532 of file FastTimerService.cc.

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

Referenced by FastTimerService().

1533 {
1534  // clear the event counters
1535  auto & stream = streams_[sid];
1536  stream.reset();
1537  ++stream.events;
1538 
1539  subprocess_event_check_[sid] = 0;
1540 
1541  thread().measure();
1542 }
std::vector< ResourcesPerJob > streams_
Measurement & thread()
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_event_check_
void FastTimerService::preSourceLumi ( )
private

Definition at line 1268 of file FastTimerService.cc.

References ignoredSignal().

1269 {
1270  ignoredSignal(__func__);
1271 }
void ignoredSignal(std::string signal) const
void FastTimerService::preSourceRun ( )
private

Definition at line 1256 of file FastTimerService.cc.

References ignoredSignal().

1257 {
1258  ignoredSignal(__func__);
1259 }
void ignoredSignal(std::string signal) const
void FastTimerService::preStreamBeginLumi ( edm::StreamContext const &  sc)
private

Definition at line 1199 of file FastTimerService.cc.

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

Referenced by FastTimerService().

1200 {
1201  ignoredSignal(__func__);
1202 
1203  // reset counters only during the main process transition
1204  if (isFirstSubprocess(sc)) {
1205  unsigned int sid = sc.streamID().value();
1207  }
1208 }
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 1035 of file FastTimerService.cc.

References callgraph_, dqm_event_ranges_, dqm_lumisections_range_, dqm_module_ranges_, dqm_path_, dqm_path_ranges_, enable_dqm_, enable_dqm_byls_, enable_dqm_bymodule_, enable_dqm_bypath_, 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().

1036 {
1037  ignoredSignal(__func__);
1038 
1039  unsigned int sid = sc.streamID().value();
1040 
1041  // reset counters and book the DQM plots during the main process being run
1042  if (isFirstSubprocess(sc)) {
1043  subprocess_run_check_[sid] = 0;
1044 
1045  // book the DQM plots
1046  if (enable_dqm_) {
1047  // define a callback to book the MonitorElements
1048  auto bookTransactionCallback = [&, this] (DQMStore::IBooker & booker)
1049  {
1050  booker.setCurrentFolder(dqm_path_);
1051  stream_plots_[sid].book(booker, callgraph_,
1060  };
1061 
1062  // book MonitorElements for this stream
1063  edm::Service<DQMStore>()->bookTransaction(bookTransactionCallback, sc.eventID().run(), sid, module_id_);
1064  }
1065  }
1066 }
const PlotRanges dqm_event_ranges_
std::vector< GroupOfModules > highlight_modules_
bool isFirstSubprocess(edm::StreamContext const &)
const bool enable_dqm_bypath_
const PlotRanges dqm_path_ranges_
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 PlotRanges dqm_module_ranges_
const bool enable_dqm_byls_
void ignoredSignal(std::string signal) const
ProcessCallGraph callgraph_
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_run_check_
void FastTimerService::preStreamEndLumi ( edm::StreamContext const &  )
private

Definition at line 1217 of file FastTimerService.cc.

References ignoredSignal().

1218 {
1219  ignoredSignal(__func__);
1220 }
void ignoredSignal(std::string signal) const
void FastTimerService::preStreamEndRun ( edm::StreamContext const &  )
private

Definition at line 1154 of file FastTimerService.cc.

References ignoredSignal().

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

Definition at line 1322 of file FastTimerService.cc.

References callgraph_, edmIntegrityCheck::group, FastTimerService::ResourcesPerJob::highlight, highlight_modules_, mps_fire::i, funct::m, ProcessCallGraph::module(), FastTimerService::ResourcesPerJob::modules, dataset::name, AlCaHLTBitMon_ParallelJobs::p, callgraph::path, printEventHeader(), printEventLine(), printHeader(), proc, ProcessCallGraph::processDescription(), ProcessCallGraph::processes(), FastTimerService::ResourcesPerJob::processes, source, ProcessCallGraph::source(), and FastTimerService::ResourcesPerJob::total.

Referenced by postEvent().

1323 {
1324  printHeader(out, "Event");
1325  printEventHeader(out, "Modules");
1326  auto const& source_d = callgraph_.source();
1327  auto const& source = data.modules[source_d.id()];
1328  printEventLine(out, source.total, source_d.moduleLabel());
1329  for (unsigned int i = 0; i < callgraph_.processes().size(); ++i) {
1330  auto const& proc_d = callgraph_.processDescription(i);
1331  auto const& proc = data.processes[i];
1332  printEventLine(out, proc.total, "process " + proc_d.name_);
1333  for (unsigned int m: proc_d.modules_) {
1334  auto const& module_d = callgraph_.module(m);
1335  auto const& module = data.modules[m];
1336  printEventLine(out, module.total, " " + module_d.moduleLabel());
1337  }
1338  }
1339  printEventLine(out, data.total, "total");
1340  out << '\n';
1341  printEventHeader(out, "Processes and Paths");
1342  printEventLine(out, source.total, source_d.moduleLabel());
1343  for (unsigned int i = 0; i < callgraph_.processes().size(); ++i) {
1344  auto const& proc_d = callgraph_.processDescription(i);
1345  auto const& proc = data.processes[i];
1346  printEventLine(out, proc.total, "process " + proc_d.name_);
1347  for (unsigned int p = 0; p < proc.paths.size(); ++p) {
1348  auto const& name = proc_d.paths_[p].name_;
1349  auto const& path = proc.paths[p];
1350  printEventLine(out, path.active, name + " (only scheduled modules)");
1351  printEventLine(out, path.total, name + " (including dependencies)");
1352  }
1353  for (unsigned int p = 0; p < proc.endpaths.size(); ++p) {
1354  auto const& name = proc_d.endPaths_[p].name_;
1355  auto const& path = proc.endpaths[p];
1356  printEventLine(out, path.active, name + " (only scheduled modules)");
1357  printEventLine(out, path.total, name + " (including dependencies)");
1358  }
1359  }
1360  printEventLine(out, data.total, "total");
1361  out << '\n';
1362  for (unsigned int group: boost::irange(0ul, highlight_modules_.size())) {
1363  printEventHeader(out, "Highlighted modules");
1364  for (unsigned int m: highlight_modules_[group].modules) {
1365  auto const& module_d = callgraph_.module(m);
1366  auto const& module = data.modules[m];
1367  printEventLine(out, module.total, " " + module_d.moduleLabel());
1368  }
1369  printEventLine(out, data.highlight[group], highlight_modules_[group].label);
1370  out << '\n';
1371  }
1372 }
std::vector< GroupOfModules > highlight_modules_
TrainProcessor *const proc
Definition: MVATrainer.cc:101
edm::ModuleDescription const & source() const
void printHeader(T &out, std::string const &label) const
void printEventHeader(T &out, std::string const &label) const
std::vector< ProcessType > const & processes() const
ProcessType const & processDescription(unsigned int) const
void printEventLine(T &out, Resources const &data, std::string const &label) const
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::printEventHeader ( T out,
std::string const &  label 
) const
private

Definition at line 1304 of file FastTimerService.cc.

Referenced by printEvent().

1305 {
1306  out << "FastReport CPU time Real time Allocated Deallocated " << label << "\n";
1307  // FastReport ######.### ms ######.### ms +######### kB -######### kB ...
1308 }
template<typename T >
void FastTimerService::printEventLine ( T out,
Resources const &  data,
std::string const &  label 
) const
private

Definition at line 1311 of file FastTimerService.cc.

References FastTimerService::Resources::allocated, FastTimerService::Resources::deallocated, cmsPerfStripChart::format, diffTwoXMLs::label, AnalysisDataFormats_SUSYBSMObjects::ms, FastTimerService::Resources::time_real, and FastTimerService::Resources::time_thread.

Referenced by printEvent().

1312 {
1313  out << boost::format("FastReport %10.3f ms %10.3f ms %+10d kB %+10d kB %s\n")
1314  % ms(data.time_thread)
1315  % ms(data.time_real)
1316  % kB(data.allocated)
1317  % kB(data.deallocated)
1318  % label;
1319 }
format
Some error handling for the usage.
susybsm::MuonSegment ms
Definition: classes.h:31
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
template<typename T >
void FastTimerService::printHeader ( T out,
std::string const &  label 
) const
private

Definition at line 1290 of file FastTimerService.cc.

References mps_fire::i.

Referenced by ntuplePrintersDiff.SeedPrinter::diff(), ntuplePrintersDiff.TrackPrinter::diff(), printEvent(), ntuplePrintersDiff.SeedPrinter::printSeed(), printSummary(), and ntuplePrintersDiff.TrackPrinter::printTrack().

1291 {
1292  out << "FastReport ";
1293  if (label.size() < 60)
1294  for (unsigned int i = (60-label.size()) / 2; i > 0; --i)
1295  out << '-';
1296  out << ' ' << label << " Summary ";
1297  if (label.size() < 60)
1298  for (unsigned int i = (59-label.size()) / 2; i > 0; --i)
1299  out << '-';
1300  out << '\n';
1301 }
template<typename T >
void FastTimerService::printSummary ( T out,
ResourcesPerJob const &  data,
std::string const &  label 
) const
private

Definition at line 1408 of file FastTimerService.cc.

References callgraph_, FastTimerService::ResourcesPerJob::events, edmIntegrityCheck::group, FastTimerService::ResourcesPerJob::highlight, highlight_modules_, mps_fire::i, funct::m, ProcessCallGraph::module(), FastTimerService::ResourcesPerJob::modules, dataset::name, AlCaHLTBitMon_ParallelJobs::p, callgraph::path, printHeader(), printSummaryHeader(), printSummaryLine(), proc, ProcessCallGraph::processDescription(), ProcessCallGraph::processes(), FastTimerService::ResourcesPerJob::processes, source, ProcessCallGraph::source(), and FastTimerService::ResourcesPerJob::total.

Referenced by postEndJob(), and postGlobalEndRun().

1409 {
1410  printHeader(out, label);
1411  printSummaryHeader(out, "Modules", true);
1412  auto const& source_d = callgraph_.source();
1413  auto const& source = data.modules[source_d.id()];
1414  printSummaryLine(out, source.total, data.events, source.events, source_d.moduleLabel());
1415  for (unsigned int i = 0; i < callgraph_.processes().size(); ++i) {
1416  auto const& proc_d = callgraph_.processDescription(i);
1417  auto const& proc = data.processes[i];
1418  printSummaryLine(out, proc.total, data.events, "process " + proc_d.name_);
1419  for (unsigned int m: proc_d.modules_) {
1420  auto const& module_d = callgraph_.module(m);
1421  auto const& module = data.modules[m];
1422  printSummaryLine(out, module.total, data.events, module.events, module_d.moduleLabel());
1423  }
1424  }
1425  printSummaryLine(out, data.total, data.events, "total");
1426  out << '\n';
1427  printSummaryHeader(out, "Processes and Paths", false);
1428  printSummaryLine(out, source.total, data.events, source_d.moduleLabel());
1429  for (unsigned int i = 0; i < callgraph_.processes().size(); ++i) {
1430  auto const& proc_d = callgraph_.processDescription(i);
1431  auto const& proc = data.processes[i];
1432  printSummaryLine(out, proc.total, data.events, "process " + proc_d.name_);
1433  for (unsigned int p = 0; p < proc.paths.size(); ++p) {
1434  auto const& name = proc_d.paths_[p].name_;
1435  auto const& path = proc.paths[p];
1436  printSummaryLine(out, path.active, data.events, name + " (only scheduled modules)");
1437  printSummaryLine(out, path.total, data.events, name + " (including dependencies)");
1438  }
1439  for (unsigned int p = 0; p < proc.endpaths.size(); ++p) {
1440  auto const& name = proc_d.endPaths_[p].name_;
1441  auto const& path = proc.endpaths[p];
1442  printSummaryLine(out, path.active, data.events, name + " (only scheduled modules)");
1443  printSummaryLine(out, path.total, data.events, name + " (including dependencies)");
1444  }
1445  }
1446  printSummaryLine(out, data.total, data.events, "total");
1447  out << '\n';
1448  for (unsigned int group: boost::irange(0ul, highlight_modules_.size())) {
1449  printSummaryHeader(out, "Highlighted modules", true);
1450  for (unsigned int m: highlight_modules_[group].modules) {
1451  auto const& module_d = callgraph_.module(m);
1452  auto const& module = data.modules[m];
1453  printSummaryLine(out, module.total, data.events, module.events, module_d.moduleLabel());
1454  }
1455  printSummaryLine(out, data.highlight[group], data.events, highlight_modules_[group].label);
1456  out << '\n';
1457  }
1458 }
std::vector< GroupOfModules > highlight_modules_
TrainProcessor *const proc
Definition: MVATrainer.cc:101
edm::ModuleDescription const & source() const
void printHeader(T &out, std::string const &label) const
void printSummaryHeader(T &out, std::string const &label, bool detaile) const
std::vector< ProcessType > const & processes() const
ProcessType const & processDescription(unsigned int) const
void printSummaryLine(T &out, Resources const &data, uint64_t events, std::string const &label) const
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::printSummaryHeader ( T out,
std::string const &  label,
bool  detaile 
) const
private

Definition at line 1375 of file FastTimerService.cc.

References diffTwoXMLs::label.

Referenced by printSummary().

1376 {
1377  if (detailed)
1378  out << "FastReport CPU time avg. when run Real time avg. when run Alloc, avg. when run Dealloc. avg. when run " << label;
1379  // FastReport ######.### ms ######.### ms ######.### ms ######.### ms +######### kB +######### kB -######### kB -######### kB ...
1380  else
1381  out << "FastReport CPU time avg. Real time avg. Alloc, avg. Dealloc. avg. " << label;
1382  // FastReport ######.### ms ######.### ms +######### kB -######### kB ...
1383 }
template<typename T >
void FastTimerService::printSummaryLine ( T out,
Resources const &  data,
uint64_t  events,
std::string const &  label 
) const
private

Definition at line 1386 of file FastTimerService.cc.

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

Referenced by printSummary().

1387 {
1388  out << boost::format("FastReport %10.3f ms %10.3f ms %+10d kB %+10d kB %s\n")
1389  % (events ? ms(data.time_thread) / events : 0)
1390  % (events ? ms(data.time_real) / events : 0)
1391  % (events ? kB(data.allocated) / events : 0)
1392  % (events ? kB(data.deallocated) / events : 0)
1393  % label;
1394 }
format
Some error handling for the usage.
susybsm::MuonSegment ms
Definition: classes.h:31
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
template<typename T >
void FastTimerService::printSummaryLine ( T out,
Resources const &  data,
uint64_t  events,
uint64_t  active,
std::string const &  label 
) const
private

Definition at line 1397 of file FastTimerService.cc.

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

1398 {
1399  out << boost::format("FastReport %10.3f ms %10.3f ms %10.3f ms %10.3f ms %+10d kB %+10d kB %+10d kB %+10d kB %s\n")
1400  % (events ? ms(data.time_thread) / events : 0) % (active ? ms(data.time_thread) / active : 0)
1401  % (events ? ms(data.time_real) / events : 0) % (active ? ms(data.time_real) / active : 0)
1402  % (events ? kB(data.allocated) / events : 0) % (active ? kB(data.allocated) / active : 0)
1403  % (events ? kB(data.deallocated) / events : 0) % (active ? kB(data.deallocated) / active : 0)
1404  % label;
1405 }
format
Some error handling for the usage.
susybsm::MuonSegment ms
Definition: classes.h:31
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
double FastTimerService::queryEventTime ( edm::StreamID  sid) const

Definition at line 900 of file FastTimerService.cc.

References AnalysisDataFormats_SUSYBSMObjects::ms, and streams_.

901 {
902  auto const& stream = streams_[sid];
903  return ms(stream.total.time_real);
904 }
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 907 of file FastTimerService.cc.

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

908 {
909  unsigned int pid = callgraph_.processId(process);
910  auto const& stream = streams_[sid];
911  return ms(stream.processes[pid].total.time_real);
912 }
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 989 of file FastTimerService.cc.

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

990 {
991  auto const& stream = streams_[sid];
992  for (unsigned int group: boost::irange(0ul, highlight_modules_.size()))
994  return ms(stream.highlight[group].time_real);
995 
996  // FIXME issue a LogWarning, raise an exception, or return NaN
997  return 0.;
998 }
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 915 of file FastTimerService.cc.

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

916 {
917  return queryModuleTime_(sid, md.id());
918 }
double queryModuleTime_(edm::StreamID, unsigned int id) const
double FastTimerService::queryModuleTime ( edm::StreamID  sid,
unsigned int  id 
) const

Definition at line 921 of file FastTimerService.cc.

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

922 {
923  if (id < callgraph_.size())
924  return queryModuleTime_(sid, id);
925 
926  // FIXME issue a LogWarning, raise an exception, or return NaN
927  return 0.;
928 }
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 885 of file FastTimerService.cc.

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

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

886 {
887  // private version, assume "id" is valid
888  auto const& stream = streams_[sid];
889  auto const& module = stream.modules[id];
890  return ms(module.total.time_real);
891 }
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 931 of file FastTimerService.cc.

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

Referenced by IsoTrig::studyTiming().

932 {
933  for (unsigned int id: boost::irange(0u, callgraph_.size()))
934  if (callgraph_.module(id).moduleLabel() == label)
935  return queryModuleTime_(sid, id);
936 
937  // FIXME issue a LogWarning, raise an exception, or return NaN
938  return 0.;
939 }
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 942 of file FastTimerService.cc.

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

943 {
944  for (unsigned int id: callgraph_.processDescription(process).modules_)
945  if (callgraph_.module(id).moduleLabel() == label)
946  return queryModuleTime_(sid, id);
947 
948  // FIXME issue a LogWarning, raise an exception, or return NaN
949  return 0.;
950 }
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 953 of file FastTimerService.cc.

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

954 {
955  auto const& stream = streams_[sid];
956  for (unsigned int pid: boost::irange(0ul, callgraph_.processes().size()))
957  {
958  auto const& desc = callgraph_.processDescription(pid);
959  for (unsigned int id: boost::irange(0ul, desc.paths_.size()))
960  if (desc.paths_[id].name_ == path)
961  return ms(stream.processes[pid].paths[id].total.time_real);
962  for (unsigned int id: boost::irange(0ul, desc.endPaths_.size()))
963  if (desc.paths_[id].name_ == path)
964  return ms(stream.processes[pid].endpaths[id].total.time_real);
965  }
966 
967  // FIXME issue a LogWarning, raise an exception, or return NaN
968  return 0.;
969 }
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 972 of file FastTimerService.cc.

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

973 {
974  auto const& stream = streams_[sid];
975  unsigned int pid = callgraph_.processId(process);
976  auto const& desc = callgraph_.processDescription(pid);
977  for (unsigned int id: boost::irange(0ul, desc.paths_.size()))
978  if (desc.paths_[id].name_ == path)
979  return ms(stream.processes[pid].paths[id].total.time_real);
980  for (unsigned int id: boost::irange(0ul, desc.endPaths_.size()))
981  if (desc.paths_[id].name_ == path)
982  return ms(stream.processes[pid].endpaths[id].total.time_real);
983 
984  // FIXME issue a LogWarning, raise an exception, or return NaN
985  return 0.;
986 }
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 894 of file FastTimerService.cc.

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

895 {
896  return queryModuleTime_(sid, callgraph_.source().id());
897 }
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 1745 of file FastTimerService.cc.

References threads_.

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

1746 {
1747  return threads_.local();
1748 }
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 1008 of file FastTimerService.cc.

References unsupported_signals_.

Referenced by postModuleEventDelayedGet(), and preModuleEventDelayedGet().

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

Member Data Documentation

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

Definition at line 438 of file FastTimerService.h.

Referenced by postBeginJob(), and preallocate().

unsigned int FastTimerService::concurrent_streams_
private

Definition at line 439 of file FastTimerService.h.

Referenced by postBeginJob(), and preallocate().

unsigned int FastTimerService::concurrent_threads_
private

Definition at line 440 of file FastTimerService.h.

Referenced by preallocate().

const PlotRanges FastTimerService::dqm_event_ranges_
private

Definition at line 456 of file FastTimerService.h.

Referenced by preStreamBeginRun().

const unsigned int FastTimerService::dqm_lumisections_range_
private

Definition at line 459 of file FastTimerService.h.

Referenced by FastTimerService(), and preStreamBeginRun().

const PlotRanges FastTimerService::dqm_module_ranges_
private

Definition at line 458 of file FastTimerService.h.

Referenced by FastTimerService(), and preStreamBeginRun().

std::string FastTimerService::dqm_path_
private

Definition at line 460 of file FastTimerService.h.

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

const PlotRanges FastTimerService::dqm_path_ranges_
private

Definition at line 457 of file FastTimerService.h.

Referenced by FastTimerService(), and preStreamBeginRun().

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

Definition at line 453 of file FastTimerService.h.

Referenced by preStreamBeginRun().

const bool FastTimerService::enable_dqm_bymodule_
private

Definition at line 451 of file FastTimerService.h.

Referenced by preStreamBeginRun().

const bool FastTimerService::enable_dqm_bynproc_
private

Definition at line 454 of file FastTimerService.h.

Referenced by preallocate().

const bool FastTimerService::enable_dqm_bypath_
private

Definition at line 452 of file FastTimerService.h.

Referenced by preStreamBeginRun().

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

Definition at line 463 of file FastTimerService.h.

Referenced by FastTimerService(), and postBeginJob().

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

Definition at line 420 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 443 of file FastTimerService.h.

Referenced by postEvent().

const bool FastTimerService::print_job_summary_
private

Definition at line 445 of file FastTimerService.h.

Referenced by postEndJob().

const bool FastTimerService::print_run_summary_
private

Definition at line 444 of file FastTimerService.h.

Referenced by postGlobalEndRun().

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

Definition at line 421 of file FastTimerService.h.

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

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

Definition at line 417 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 429 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 432 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 430 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 431 of file FastTimerService.h.

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

std::mutex FastTimerService::summary_mutex_
private

Definition at line 422 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 426 of file FastTimerService.h.

Referenced by thread().

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

Definition at line 467 of file FastTimerService.h.

Referenced by unsupportedSignal().