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_
 
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 774 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().

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

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

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

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

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

1454 {
1455  return (not sc.processContext()->isSubProcess());
1456 }
bool FastTimerService::isFirstSubprocess ( edm::GlobalContext const &  gc)
private

Definition at line 1459 of file FastTimerService.cc.

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

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

Definition at line 1466 of file FastTimerService.cc.

References callgraph_, and ProcessCallGraph::processes().

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

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

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

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

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

Referenced by FastTimerService().

1272 {
1273  if (print_job_summary_) {
1274  edm::LogVerbatim out("FastReport");
1275  printSummary(out, job_summary_, "Job");
1276  }
1277 }
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 1481 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().

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

References ignoredSignal().

1634 {
1635  ignoredSignal(__func__);
1636 }
void ignoredSignal(std::string signal) const
void FastTimerService::postGlobalBeginLumi ( edm::GlobalContext const &  )
private

Definition at line 1172 of file FastTimerService.cc.

References ignoredSignal().

1173 {
1174  ignoredSignal(__func__);
1175 }
void ignoredSignal(std::string signal) const
void FastTimerService::postGlobalBeginRun ( edm::GlobalContext const &  )
private

Definition at line 1021 of file FastTimerService.cc.

References ignoredSignal().

1022 {
1023  ignoredSignal(__func__);
1024 }
void ignoredSignal(std::string signal) const
void FastTimerService::postGlobalEndLumi ( edm::GlobalContext const &  )
private

Definition at line 1184 of file FastTimerService.cc.

References ignoredSignal().

1185 {
1186  ignoredSignal(__func__);
1187 }
void ignoredSignal(std::string signal) const
void FastTimerService::postGlobalEndRun ( edm::GlobalContext const &  gc)
private

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

1235 {
1236  ignoredSignal(__func__);
1237 
1238  // handle the summaries only after the last subprocess has run
1239  bool last = isLastSubprocess(subprocess_global_run_check_[gc.runIndex()]);
1240  if (print_run_summary_ and last) {
1241  edm::LogVerbatim out("FastReport");
1242  printSummary(out, run_summary_[gc.runIndex()], "Run");
1243  }
1244 }
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 1591 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().

1592 {
1593  edm::ModuleDescription const& md = * mcc.moduleDescription();
1594  unsigned int id = md.id();
1595  unsigned int sid = sc.streamID().value();
1596  auto & stream = streams_[sid];
1597 
1598  thread().measure_and_store(stream.modules[id].total);
1599  ++stream.modules[id].events;
1600 }
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 1609 of file FastTimerService.cc.

References unsupportedSignal().

Referenced by FastTimerService().

1610 {
1611  unsupportedSignal(__func__);
1612 }
void unsupportedSignal(std::string signal) const
void FastTimerService::postModuleEventPrefetching ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1621 of file FastTimerService.cc.

References ignoredSignal().

1622 {
1623  ignoredSignal(__func__);
1624 }
void ignoredSignal(std::string signal) const
void FastTimerService::postModuleGlobalBeginLumi ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1669 of file FastTimerService.cc.

References ignoredSignal().

1670 {
1671  ignoredSignal(__func__);
1672 }
void ignoredSignal(std::string signal) const
void FastTimerService::postModuleGlobalBeginRun ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1645 of file FastTimerService.cc.

References ignoredSignal().

1646 {
1647  ignoredSignal(__func__);
1648 }
void ignoredSignal(std::string signal) const
void FastTimerService::postModuleGlobalEndLumi ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1681 of file FastTimerService.cc.

References ignoredSignal().

1682 {
1683  ignoredSignal(__func__);
1684 }
void ignoredSignal(std::string signal) const
void FastTimerService::postModuleGlobalEndRun ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1657 of file FastTimerService.cc.

References ignoredSignal().

1658 {
1659  ignoredSignal(__func__);
1660 }
void ignoredSignal(std::string signal) const
void FastTimerService::postModuleStreamBeginLumi ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1717 of file FastTimerService.cc.

References ignoredSignal().

1718 {
1719  ignoredSignal(__func__);
1720 }
void ignoredSignal(std::string signal) const
void FastTimerService::postModuleStreamBeginRun ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1693 of file FastTimerService.cc.

References ignoredSignal().

1694 {
1695  ignoredSignal(__func__);
1696 }
void ignoredSignal(std::string signal) const
void FastTimerService::postModuleStreamEndLumi ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1729 of file FastTimerService.cc.

References ignoredSignal().

1730 {
1731  ignoredSignal(__func__);
1732 }
void ignoredSignal(std::string signal) const
void FastTimerService::postModuleStreamEndRun ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1705 of file FastTimerService.cc.

References ignoredSignal().

1706 {
1707  ignoredSignal(__func__);
1708 }
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 1562 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().

1563 {
1564  unsigned int sid = sc.streamID().value();
1565  unsigned int pid = callgraph_.processId(* sc.processContext());
1566  unsigned int id = pc.pathID();
1567  auto & stream = streams_[sid];
1568  auto & data = pc.isEndPath() ? stream.processes[pid].endpaths[id] : stream.processes[pid].paths[id];
1569 
1570  auto const& path = pc.isEndPath() ? callgraph_.processDescription(pid).endPaths_[id] : callgraph_.processDescription(pid).paths_[id];
1571  unsigned int index = path.modules_on_path_.empty() ? 0 : status.index() + 1;
1572  data.last = path.modules_on_path_.empty() ? 0 : path.last_dependency_of_module_[status.index()];
1573 
1574  for (unsigned int i = 0; i < index; ++i) {
1575  auto const& module = stream.modules[path.modules_on_path_[i]];
1576  data.active += module.total;
1577  }
1578  for (unsigned int i = 0; i < data.last; ++i) {
1579  auto const& module = stream.modules[path.modules_and_dependencies_[i]];
1580  data.total += module.total;
1581  }
1582 }
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 1537 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().

1538 {
1540  unsigned int id = md.id();
1541  auto & stream = streams_[sid];
1542 
1543  thread().measure_and_store(stream.modules[id].total);
1544  ++stream.modules[id].events;
1545 }
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 1265 of file FastTimerService.cc.

References ignoredSignal().

1266 {
1267  ignoredSignal(__func__);
1268 }
void ignoredSignal(std::string signal) const
void FastTimerService::postSourceRun ( )
private

Definition at line 1253 of file FastTimerService.cc.

References ignoredSignal().

1254 {
1255  ignoredSignal(__func__);
1256 }
void ignoredSignal(std::string signal) const
void FastTimerService::postStreamBeginLumi ( edm::StreamContext const &  sc)
private

Definition at line 1202 of file FastTimerService.cc.

References ignoredSignal().

1203 {
1204  ignoredSignal(__func__);
1205 }
void ignoredSignal(std::string signal) const
void FastTimerService::postStreamBeginRun ( edm::StreamContext const &  sc)
private

Definition at line 1139 of file FastTimerService.cc.

References ignoredSignal().

1140 {
1141  ignoredSignal(__func__);
1142 }
void ignoredSignal(std::string signal) const
void FastTimerService::postStreamEndLumi ( edm::StreamContext const &  sc)
private

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

1214  {
1215  ignoredSignal(__func__);
1216 
1217  unsigned int sid = sc.streamID().value();
1218 
1219  // merge plots only after the last subprocess has run
1221  if (enable_dqm_ and last) {
1222  DQMStore & store = * edm::Service<DQMStore>();
1223  store.mergeAndResetMEsLuminositySummaryCache(sc.eventID().run(),sc.eventID().luminosityBlock(),sid, module_id_);
1224  }
1225 }
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 1151 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().

1152 {
1153  ignoredSignal(__func__);
1154 
1155  unsigned int sid = sc.streamID().value();
1156 
1157  // merge plots only after the last subprocess has run
1159  if (enable_dqm_ and last) {
1160  DQMStore & store = * edm::Service<DQMStore>();
1161  store.mergeAndResetMEsRunSummaryCache(sc.eventID().run(), sid, module_id_);
1162  }
1163 }
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 1061 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().

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

References callgraph_, and ProcessCallGraph::preBeginJob().

Referenced by FastTimerService().

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

Definition at line 1475 of file FastTimerService.cc.

References ignoredSignal().

1476 {
1477  ignoredSignal(__func__);
1478 }
void ignoredSignal(std::string signal) const
void FastTimerService::preEventReadFromSource ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1627 of file FastTimerService.cc.

References ignoredSignal().

1628 {
1629  ignoredSignal(__func__);
1630 }
void ignoredSignal(std::string signal) const
void FastTimerService::preGlobalBeginLumi ( edm::GlobalContext const &  )
private

Definition at line 1166 of file FastTimerService.cc.

References ignoredSignal().

1167 {
1168  ignoredSignal(__func__);
1169 }
void ignoredSignal(std::string signal) const
void FastTimerService::preGlobalBeginRun ( edm::GlobalContext const &  gc)
private

Definition at line 1009 of file FastTimerService.cc.

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

Referenced by FastTimerService().

1010 {
1011  ignoredSignal(__func__);
1012 
1013  // reset the run counters only during the main process being run
1014  if (isFirstSubprocess(gc)) {
1015  subprocess_global_run_check_[gc.runIndex()] = 0;
1016  run_summary_[gc.runIndex()].reset();
1017  }
1018 }
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 1178 of file FastTimerService.cc.

References ignoredSignal().

1179 {
1180  ignoredSignal(__func__);
1181 }
void ignoredSignal(std::string signal) const
void FastTimerService::preGlobalEndRun ( edm::GlobalContext const &  )
private

Definition at line 1228 of file FastTimerService.cc.

References ignoredSignal().

1229 {
1230  ignoredSignal(__func__);
1231 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleEvent ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1585 of file FastTimerService.cc.

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

Referenced by FastTimerService().

1586 {
1587  thread().measure();
1588 }
Measurement & thread()
void FastTimerService::preModuleEventDelayedGet ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1603 of file FastTimerService.cc.

References unsupportedSignal().

Referenced by FastTimerService().

1604 {
1605  unsupportedSignal(__func__);
1606 }
void unsupportedSignal(std::string signal) const
void FastTimerService::preModuleEventPrefetching ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1615 of file FastTimerService.cc.

References ignoredSignal().

1616 {
1617  ignoredSignal(__func__);
1618 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleGlobalBeginLumi ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1663 of file FastTimerService.cc.

References ignoredSignal().

1664 {
1665  ignoredSignal(__func__);
1666 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleGlobalBeginRun ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1639 of file FastTimerService.cc.

References ignoredSignal().

1640 {
1641  ignoredSignal(__func__);
1642 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleGlobalEndLumi ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1675 of file FastTimerService.cc.

References ignoredSignal().

1676 {
1677  ignoredSignal(__func__);
1678 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleGlobalEndRun ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1651 of file FastTimerService.cc.

References ignoredSignal().

1652 {
1653  ignoredSignal(__func__);
1654 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleStreamBeginLumi ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1711 of file FastTimerService.cc.

References ignoredSignal().

1712 {
1713  ignoredSignal(__func__);
1714 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleStreamBeginRun ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1687 of file FastTimerService.cc.

References ignoredSignal().

1688 {
1689  ignoredSignal(__func__);
1690 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleStreamEndLumi ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1723 of file FastTimerService.cc.

References ignoredSignal().

1724 {
1725  ignoredSignal(__func__);
1726 }
void ignoredSignal(std::string signal) const
void FastTimerService::preModuleStreamEndRun ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &   
)
private

Definition at line 1699 of file FastTimerService.cc.

References ignoredSignal().

1700 {
1701  ignoredSignal(__func__);
1702 }
void ignoredSignal(std::string signal) const
void FastTimerService::prePathEvent ( edm::StreamContext const &  sc,
edm::PathContext const &  pc 
)
private

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

1550 {
1551  unsigned int sid = sc.streamID().value();
1552  unsigned int pid = callgraph_.processId(* sc.processContext());
1553  unsigned int id = pc.pathID();
1554  auto & stream = streams_[sid];
1555  auto & data = pc.isEndPath() ? stream.processes[pid].endpaths[id] : stream.processes[pid].paths[id];
1556  data.status = false;
1557  data.last = 0;
1558 }
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 1089 of file FastTimerService.cc.

References callgraph_, and ProcessCallGraph::preSourceConstruction().

Referenced by FastTimerService().

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

Definition at line 1523 of file FastTimerService.cc.

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

Referenced by FastTimerService().

1524 {
1525  // clear the event counters
1526  auto & stream = streams_[sid];
1527  stream.reset();
1528  ++stream.events;
1529 
1530  subprocess_event_check_[sid] = 0;
1531 
1532  thread().measure();
1533 }
std::vector< ResourcesPerJob > streams_
Measurement & thread()
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_event_check_
void FastTimerService::preSourceLumi ( )
private

Definition at line 1259 of file FastTimerService.cc.

References ignoredSignal().

1260 {
1261  ignoredSignal(__func__);
1262 }
void ignoredSignal(std::string signal) const
void FastTimerService::preSourceRun ( )
private

Definition at line 1247 of file FastTimerService.cc.

References ignoredSignal().

1248 {
1249  ignoredSignal(__func__);
1250 }
void ignoredSignal(std::string signal) const
void FastTimerService::preStreamBeginLumi ( edm::StreamContext const &  sc)
private

Definition at line 1190 of file FastTimerService.cc.

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

Referenced by FastTimerService().

1191 {
1192  ignoredSignal(__func__);
1193 
1194  // reset counters only during the main process transition
1195  if (isFirstSubprocess(sc)) {
1196  unsigned int sid = sc.streamID().value();
1198  }
1199 }
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 1027 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_, 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().

1028 {
1029  ignoredSignal(__func__);
1030 
1031  unsigned int sid = sc.streamID().value();
1032 
1033  // reset counters and book the DQM plots during the main process being run
1034  if (isFirstSubprocess(sc)) {
1035  subprocess_run_check_[sid] = 0;
1036 
1037  // book the DQM plots
1038  if (enable_dqm_) {
1039  // define a callback to book the MonitorElements
1040  auto bookTransactionCallback = [&, this] (DQMStore::IBooker & booker)
1041  {
1042  booker.setCurrentFolder(dqm_path_);
1043  stream_plots_[sid].book(booker, callgraph_,
1051  };
1052 
1053  // book MonitorElements for this stream
1054  edm::Service<DQMStore>()->bookTransaction(bookTransactionCallback, sc.eventID().run(), sid, module_id_);
1055  }
1056  }
1057 }
const PlotRanges dqm_event_ranges_
std::vector< GroupOfModules > highlight_modules_
bool isFirstSubprocess(edm::StreamContext const &)
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 1208 of file FastTimerService.cc.

References ignoredSignal().

1209 {
1210  ignoredSignal(__func__);
1211 }
void ignoredSignal(std::string signal) const
void FastTimerService::preStreamEndRun ( edm::StreamContext const &  )
private

Definition at line 1145 of file FastTimerService.cc.

References ignoredSignal().

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

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

1314 {
1315  printHeader(out, "Event");
1316  printEventHeader(out, "Modules");
1317  auto const& source_d = callgraph_.source();
1318  auto const& source = data.modules[source_d.id()];
1319  printEventLine(out, source.total, source_d.moduleLabel());
1320  for (unsigned int i = 0; i < callgraph_.processes().size(); ++i) {
1321  auto const& proc_d = callgraph_.processDescription(i);
1322  auto const& proc = data.processes[i];
1323  printEventLine(out, proc.total, "process " + proc_d.name_);
1324  for (unsigned int m: proc_d.modules_) {
1325  auto const& module_d = callgraph_.module(m);
1326  auto const& module = data.modules[m];
1327  printEventLine(out, module.total, " " + module_d.moduleLabel());
1328  }
1329  }
1330  printEventLine(out, data.total, "total");
1331  out << '\n';
1332  printEventHeader(out, "Processes and Paths");
1333  printEventLine(out, source.total, source_d.moduleLabel());
1334  for (unsigned int i = 0; i < callgraph_.processes().size(); ++i) {
1335  auto const& proc_d = callgraph_.processDescription(i);
1336  auto const& proc = data.processes[i];
1337  printEventLine(out, proc.total, "process " + proc_d.name_);
1338  for (unsigned int p = 0; p < proc.paths.size(); ++p) {
1339  auto const& name = proc_d.paths_[p].name_;
1340  auto const& path = proc.paths[p];
1341  printEventLine(out, path.active, name + " (only scheduled modules)");
1342  printEventLine(out, path.total, name + " (including dependencies)");
1343  }
1344  for (unsigned int p = 0; p < proc.endpaths.size(); ++p) {
1345  auto const& name = proc_d.endPaths_[p].name_;
1346  auto const& path = proc.endpaths[p];
1347  printEventLine(out, path.active, name + " (only scheduled modules)");
1348  printEventLine(out, path.total, name + " (including dependencies)");
1349  }
1350  }
1351  printEventLine(out, data.total, "total");
1352  out << '\n';
1353  for (unsigned int group: boost::irange(0ul, highlight_modules_.size())) {
1354  printEventHeader(out, "Highlighted modules");
1355  for (unsigned int m: highlight_modules_[group].modules) {
1356  auto const& module_d = callgraph_.module(m);
1357  auto const& module = data.modules[m];
1358  printEventLine(out, module.total, " " + module_d.moduleLabel());
1359  }
1360  printEventLine(out, data.highlight[group], highlight_modules_[group].label);
1361  out << '\n';
1362  }
1363 }
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 1295 of file FastTimerService.cc.

Referenced by printEvent().

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

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

1303 {
1304  out << boost::format("FastReport %10.3f ms %10.3f ms %+10d kB %+10d kB %s\n")
1305  % ms(data.time_thread)
1306  % ms(data.time_real)
1307  % kB(data.allocated)
1308  % kB(data.deallocated)
1309  % label;
1310 }
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 1281 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().

1282 {
1283  out << "FastReport ";
1284  if (label.size() < 60)
1285  for (unsigned int i = (60-label.size()) / 2; i > 0; --i)
1286  out << '-';
1287  out << ' ' << label << " Summary ";
1288  if (label.size() < 60)
1289  for (unsigned int i = (59-label.size()) / 2; i > 0; --i)
1290  out << '-';
1291  out << '\n';
1292 }
template<typename T >
void FastTimerService::printSummary ( T out,
ResourcesPerJob const &  data,
std::string const &  label 
) const
private

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

1400 {
1401  printHeader(out, label);
1402  printSummaryHeader(out, "Modules", true);
1403  auto const& source_d = callgraph_.source();
1404  auto const& source = data.modules[source_d.id()];
1405  printSummaryLine(out, source.total, data.events, source.events, source_d.moduleLabel());
1406  for (unsigned int i = 0; i < callgraph_.processes().size(); ++i) {
1407  auto const& proc_d = callgraph_.processDescription(i);
1408  auto const& proc = data.processes[i];
1409  printSummaryLine(out, proc.total, data.events, "process " + proc_d.name_);
1410  for (unsigned int m: proc_d.modules_) {
1411  auto const& module_d = callgraph_.module(m);
1412  auto const& module = data.modules[m];
1413  printSummaryLine(out, module.total, data.events, module.events, module_d.moduleLabel());
1414  }
1415  }
1416  printSummaryLine(out, data.total, data.events, "total");
1417  out << '\n';
1418  printSummaryHeader(out, "Processes and Paths", false);
1419  printSummaryLine(out, source.total, data.events, source_d.moduleLabel());
1420  for (unsigned int i = 0; i < callgraph_.processes().size(); ++i) {
1421  auto const& proc_d = callgraph_.processDescription(i);
1422  auto const& proc = data.processes[i];
1423  printSummaryLine(out, proc.total, data.events, "process " + proc_d.name_);
1424  for (unsigned int p = 0; p < proc.paths.size(); ++p) {
1425  auto const& name = proc_d.paths_[p].name_;
1426  auto const& path = proc.paths[p];
1427  printSummaryLine(out, path.active, data.events, name + " (only scheduled modules)");
1428  printSummaryLine(out, path.total, data.events, name + " (including dependencies)");
1429  }
1430  for (unsigned int p = 0; p < proc.endpaths.size(); ++p) {
1431  auto const& name = proc_d.endPaths_[p].name_;
1432  auto const& path = proc.endpaths[p];
1433  printSummaryLine(out, path.active, data.events, name + " (only scheduled modules)");
1434  printSummaryLine(out, path.total, data.events, name + " (including dependencies)");
1435  }
1436  }
1437  printSummaryLine(out, data.total, data.events, "total");
1438  out << '\n';
1439  for (unsigned int group: boost::irange(0ul, highlight_modules_.size())) {
1440  printSummaryHeader(out, "Highlighted modules", true);
1441  for (unsigned int m: highlight_modules_[group].modules) {
1442  auto const& module_d = callgraph_.module(m);
1443  auto const& module = data.modules[m];
1444  printSummaryLine(out, module.total, data.events, module.events, module_d.moduleLabel());
1445  }
1446  printSummaryLine(out, data.highlight[group], data.events, highlight_modules_[group].label);
1447  out << '\n';
1448  }
1449 }
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 1366 of file FastTimerService.cc.

References diffTwoXMLs::label.

Referenced by printSummary().

1367 {
1368  if (detailed)
1369  out << "FastReport CPU time avg. when run Real time avg. when run Alloc, avg. when run Dealloc. avg. when run " << label;
1370  // FastReport ######.### ms ######.### ms ######.### ms ######.### ms +######### kB +######### kB -######### kB -######### kB ...
1371  else
1372  out << "FastReport CPU time avg. Real time avg. Alloc, avg. Dealloc. avg. " << label;
1373  // FastReport ######.### ms ######.### ms +######### kB -######### kB ...
1374 }
template<typename T >
void FastTimerService::printSummaryLine ( T out,
Resources const &  data,
uint64_t  events,
std::string const &  label 
) const
private

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

1378 {
1379  out << boost::format("FastReport %10.3f ms %10.3f ms %+10d kB %+10d kB %s\n")
1380  % (events ? ms(data.time_thread) / events : 0)
1381  % (events ? ms(data.time_real) / events : 0)
1382  % (events ? kB(data.allocated) / events : 0)
1383  % (events ? kB(data.deallocated) / events : 0)
1384  % label;
1385 }
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 1388 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.

1389 {
1390  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")
1391  % (events ? ms(data.time_thread) / events : 0) % (active ? ms(data.time_thread) / active : 0)
1392  % (events ? ms(data.time_real) / events : 0) % (active ? ms(data.time_real) / active : 0)
1393  % (events ? kB(data.allocated) / events : 0) % (active ? kB(data.allocated) / active : 0)
1394  % (events ? kB(data.deallocated) / events : 0) % (active ? kB(data.deallocated) / active : 0)
1395  % label;
1396 }
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 892 of file FastTimerService.cc.

References AnalysisDataFormats_SUSYBSMObjects::ms, and streams_.

893 {
894  auto const& stream = streams_[sid];
895  return ms(stream.total.time_real);
896 }
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 899 of file FastTimerService.cc.

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

900 {
901  unsigned int pid = callgraph_.processId(process);
902  auto const& stream = streams_[sid];
903  return ms(stream.processes[pid].total.time_real);
904 }
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 981 of file FastTimerService.cc.

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

982 {
983  auto const& stream = streams_[sid];
984  for (unsigned int group: boost::irange(0ul, highlight_modules_.size()))
986  return ms(stream.highlight[group].time_real);
987 
988  // FIXME issue a LogWarning, raise an exception, or return NaN
989  return 0.;
990 }
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 907 of file FastTimerService.cc.

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

908 {
909  return queryModuleTime_(sid, md.id());
910 }
double queryModuleTime_(edm::StreamID, unsigned int id) const
double FastTimerService::queryModuleTime ( edm::StreamID  sid,
unsigned int  id 
) const

Definition at line 913 of file FastTimerService.cc.

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

914 {
915  if (id < callgraph_.size())
916  return queryModuleTime_(sid, id);
917 
918  // FIXME issue a LogWarning, raise an exception, or return NaN
919  return 0.;
920 }
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 877 of file FastTimerService.cc.

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

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

878 {
879  // private version, assume "id" is valid
880  auto const& stream = streams_[sid];
881  auto const& module = stream.modules[id];
882  return ms(module.total.time_real);
883 }
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 923 of file FastTimerService.cc.

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

Referenced by IsoTrig::studyTiming().

924 {
925  for (unsigned int id: boost::irange(0u, callgraph_.size()))
926  if (callgraph_.module(id).moduleLabel() == label)
927  return queryModuleTime_(sid, id);
928 
929  // FIXME issue a LogWarning, raise an exception, or return NaN
930  return 0.;
931 }
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 934 of file FastTimerService.cc.

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

935 {
936  for (unsigned int id: callgraph_.processDescription(process).modules_)
937  if (callgraph_.module(id).moduleLabel() == label)
938  return queryModuleTime_(sid, id);
939 
940  // FIXME issue a LogWarning, raise an exception, or return NaN
941  return 0.;
942 }
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 945 of file FastTimerService.cc.

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

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

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

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

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

887 {
888  return queryModuleTime_(sid, callgraph_.source().id());
889 }
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 1736 of file FastTimerService.cc.

References threads_.

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

1737 {
1738  return threads_.local();
1739 }
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 1000 of file FastTimerService.cc.

References unsupported_signals_.

Referenced by postModuleEventDelayedGet(), and preModuleEventDelayedGet().

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

Member Data Documentation

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

Definition at line 437 of file FastTimerService.h.

Referenced by postBeginJob(), and preallocate().

unsigned int FastTimerService::concurrent_streams_
private

Definition at line 438 of file FastTimerService.h.

Referenced by postBeginJob(), and preallocate().

unsigned int FastTimerService::concurrent_threads_
private

Definition at line 439 of file FastTimerService.h.

Referenced by preallocate().

const PlotRanges FastTimerService::dqm_event_ranges_
private

Definition at line 454 of file FastTimerService.h.

Referenced by preStreamBeginRun().

const unsigned int FastTimerService::dqm_lumisections_range_
private

Definition at line 457 of file FastTimerService.h.

Referenced by FastTimerService(), and preStreamBeginRun().

const PlotRanges FastTimerService::dqm_module_ranges_
private

Definition at line 456 of file FastTimerService.h.

Referenced by FastTimerService(), and preStreamBeginRun().

std::string FastTimerService::dqm_path_
private

Definition at line 458 of file FastTimerService.h.

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

const PlotRanges FastTimerService::dqm_path_ranges_
private

Definition at line 455 of file FastTimerService.h.

Referenced by FastTimerService(), and preStreamBeginRun().

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

Definition at line 451 of file FastTimerService.h.

Referenced by preStreamBeginRun().

const bool FastTimerService::enable_dqm_bymodule_
private

Definition at line 450 of file FastTimerService.h.

Referenced by preStreamBeginRun().

const bool FastTimerService::enable_dqm_bynproc_
private

Definition at line 452 of file FastTimerService.h.

Referenced by preallocate().

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

Definition at line 461 of file FastTimerService.h.

Referenced by FastTimerService(), and postBeginJob().

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

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

Referenced by postEvent().

const bool FastTimerService::print_job_summary_
private

Definition at line 444 of file FastTimerService.h.

Referenced by postEndJob().

const bool FastTimerService::print_run_summary_
private

Definition at line 443 of file FastTimerService.h.

Referenced by postGlobalEndRun().

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

Definition at line 420 of file FastTimerService.h.

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

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

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

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

std::mutex FastTimerService::summary_mutex_
private

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

Referenced by thread().

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

Definition at line 465 of file FastTimerService.h.

Referenced by unsupportedSignal().