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>

Inheritance diagram for FastTimerService:

Classes

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

Public Member Functions

template<typename T >
json encodeToJSON (std::string const &type, std::string const &label, unsigned int events, T const &data) const
 
 FastTimerService (const edm::ParameterSet &, edm::ActivityRegistry &)
 
template<typename T >
void printEvent (T &out, ResourcesPerJob const &data) 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 printEventLine (T &out, AtomicResources const &data, std::string const &label) const
 
template<typename T >
void printHeader (T &out, std::string const &label) const
 
template<typename T >
void printPathSummaryHeader (T &out, std::string const &label) const
 
template<typename T >
void printPathSummaryLine (T &out, Resources const &data, Resources const &total, uint64_t events, std::string const &label) const
 
template<typename T >
void printSummary (T &out, ResourcesPerJob const &data, std::string const &label) const
 
template<typename T >
void printSummaryHeader (T &out, std::string const &label, bool detailed) 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, AtomicResources const &data, uint64_t events, uint64_t active, std::string const &label) const
 
template<typename T >
void printSummaryLine (T &out, AtomicResources 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
 
template<typename T >
void printTransition (T &out, AtomicResources const &data, std::string const &label) const
 
 ~FastTimerService () override=default
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
static void fixForDQM (std::string &label)
 

Private Member Functions

template<typename T >
json encodeToJSON (std::string const &type, std::string const &label, unsigned int events, T const &data) const
 
json encodeToJSON (edm::ModuleDescription const &module, ResourcesPerModule const &data) const
 
void ignoredSignal (const std::string &signal) const
 
bool isFirstSubprocess (edm::StreamContext const &)
 
bool isFirstSubprocess (edm::GlobalContext const &)
 
bool isLastSubprocess (std::atomic< unsigned int > &check)
 
void on_scheduler_entry (bool worker) final
 
void on_scheduler_exit (bool worker) final
 
void postBeginJob ()
 
void postEndJob ()
 
void postESModule (edm::eventsetup::EventSetupRecordKey const &, edm::ESModuleCallingContext const &)
 
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 postModuleEventAcquire (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 (edm::LuminosityBlockIndex)
 
void postSourceRun (edm::RunIndex)
 
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 preESModule (edm::eventsetup::EventSetupRecordKey const &, edm::ESModuleCallingContext 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 preModuleEventAcquire (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 (edm::LuminosityBlockIndex)
 
void preSourceRun (edm::RunIndex)
 
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 printEventLine (T &out, AtomicResources const &data, std::string const &label) const
 
template<typename T >
void printHeader (T &out, std::string const &label) const
 
template<typename T >
void printPathSummaryHeader (T &out, std::string const &label) const
 
template<typename T >
void printPathSummaryLine (T &out, Resources const &data, Resources const &total, uint64_t events, std::string const &label) const
 
template<typename T >
void printSummary (T &out, ResourcesPerJob const &data, std::string const &label) const
 
template<typename T >
void printSummaryHeader (T &out, std::string const &label, bool detailed) 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
 
template<typename T >
void printSummaryLine (T &out, AtomicResources const &data, uint64_t events, std::string const &label) const
 
template<typename T >
void printSummaryLine (T &out, AtomicResources const &data, uint64_t events, uint64_t active, std::string const &label) const
 
template<typename T >
void printTransition (T &out, AtomicResources const &data, std::string const &label) const
 
Measurementthread ()
 
void unsupportedSignal (const std::string &signal) const
 
void writeSummaryJSON (ResourcesPerJob const &data, std::string const &filename) const
 

Private Attributes

ProcessCallGraph callgraph_
 
unsigned int concurrent_lumis_
 
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_
 
const bool enable_dqm_transitions_
 
ThreadGuard guard_
 
std::vector< edm::ParameterSethighlight_module_psets_
 
std::vector< GroupOfModuleshighlight_modules_
 
ResourcesPerJob job_summary_
 
const std::string json_filename_
 
std::vector< AtomicResourceslumi_transition_
 
AtomicResources overhead_
 
std::unique_ptr< PlotsPerJobplots_
 
const bool print_event_summary_
 
const bool print_job_summary_
 
const bool print_run_summary_
 
std::vector< ResourcesPerJobrun_summary_
 
std::vector< AtomicResourcesrun_transition_
 
std::vector< ResourcesPerJobstreams_
 
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_event_check_
 
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_global_lumi_check_
 
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_global_run_check_
 
std::mutex summary_mutex_
 
tbb::concurrent_unordered_set< std::string > unsupported_signals_
 
const bool write_json_summary_
 

Detailed Description

Definition at line 55 of file FastTimerService.h.

Constructor & Destructor Documentation

◆ FastTimerService()

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

Definition at line 776 of file FastTimerService.cc.

777  : // configuration
778  callgraph_(),
779  // job configuration
781  concurrent_runs_(0),
784  print_event_summary_(config.getUntrackedParameter<bool>("printEventSummary")),
785  print_run_summary_(config.getUntrackedParameter<bool>("printRunSummary")),
786  print_job_summary_(config.getUntrackedParameter<bool>("printJobSummary")),
787  // JSON configuration
788  //write_json_per_event_(config.getUntrackedParameter<bool>("writeJSONByEvent")),
789  //write_json_per_ls_(config.getUntrackedParameter<bool>("writeJSONByLumiSection")),
790  //write_json_per_run_(config.getUntrackedParameter<bool>("writeJSONByRun")),
791  write_json_summary_(config.getUntrackedParameter<bool>("writeJSONSummary")),
792  json_filename_(config.getUntrackedParameter<std::string>("jsonFileName")),
793  // DQM configuration
794  enable_dqm_(config.getUntrackedParameter<bool>("enableDQM")),
795  enable_dqm_bymodule_(config.getUntrackedParameter<bool>("enableDQMbyModule")),
796  enable_dqm_bypath_(config.getUntrackedParameter<bool>("enableDQMbyPath")),
797  enable_dqm_byls_(config.getUntrackedParameter<bool>("enableDQMbyLumiSection")),
798  enable_dqm_bynproc_(config.getUntrackedParameter<bool>("enableDQMbyProcesses")),
799  enable_dqm_transitions_(config.getUntrackedParameter<bool>("enableDQMTransitions")),
800  dqm_event_ranges_({config.getUntrackedParameter<double>("dqmTimeRange"), // ms
801  config.getUntrackedParameter<double>("dqmTimeResolution"), // ms
802  config.getUntrackedParameter<double>("dqmMemoryRange"), // kB
803  config.getUntrackedParameter<double>("dqmMemoryResolution")}), // kB
804  dqm_path_ranges_({config.getUntrackedParameter<double>("dqmPathTimeRange"), // ms
805  config.getUntrackedParameter<double>("dqmPathTimeResolution"), // ms
806  config.getUntrackedParameter<double>("dqmPathMemoryRange"), // kB
807  config.getUntrackedParameter<double>("dqmPathMemoryResolution")}), // kB
808  dqm_module_ranges_({config.getUntrackedParameter<double>("dqmModuleTimeRange"), // ms
809  config.getUntrackedParameter<double>("dqmModuleTimeResolution"), // ms
810  config.getUntrackedParameter<double>("dqmModuleMemoryRange"), // kB
811  config.getUntrackedParameter<double>("dqmModuleMemoryResolution")}), // kB
812  dqm_lumisections_range_(config.getUntrackedParameter<unsigned int>("dqmLumiSectionsRange")),
813  dqm_path_(config.getUntrackedParameter<std::string>("dqmPath")),
814  // highlight configuration
815  highlight_module_psets_(config.getUntrackedParameter<std::vector<edm::ParameterSet>>("highlightModules")),
816  highlight_modules_(highlight_module_psets_.size()) // filled in postBeginJob()
817 {
818  // start observing when a thread enters or leaves the TBB global thread arena
819  tbb::task_scheduler_observer::observe();
820 
821  // register EDM call backs
827  //registry.watchPostGlobalBeginRun( this, & FastTimerService::postGlobalBeginRun );
828  //registry.watchPreGlobalEndRun( this, & FastTimerService::preGlobalEndRun );
831  //registry.watchPostStreamBeginRun( this, & FastTimerService::postStreamBeginRun );
832  //registry.watchPreStreamEndRun( this, & FastTimerService::preStreamEndRun );
835  //registry.watchPostGlobalBeginLumi( this, & FastTimerService::postGlobalBeginLumi );
836  //registry.watchPreGlobalEndLumi( this, & FastTimerService::preGlobalEndLumi );
839  //registry.watchPostStreamBeginLumi( this, & FastTimerService::postStreamBeginLumi );
840  //registry.watchPreStreamEndLumi( this, & FastTimerService::preStreamEndLumi );
842  registry.watchPreEvent(this, &FastTimerService::preEvent);
847  //registry.watchPostSourceConstruction( this, & FastTimerService::postSourceConstruction);
854  //registry.watchPreModuleConstruction( this, & FastTimerService::preModuleConstruction);
855  //registry.watchPostModuleConstruction( this, & FastTimerService::postModuleConstruction);
856  //registry.watchPreModuleBeginJob( this, & FastTimerService::preModuleBeginJob );
857  //registry.watchPostModuleBeginJob( this, & FastTimerService::postModuleBeginJob );
858  //registry.watchPreModuleEndJob( this, & FastTimerService::preModuleEndJob );
859  //registry.watchPostModuleEndJob( this, & FastTimerService::postModuleEndJob );
860  //registry.watchPreModuleBeginStream( this, & FastTimerService::preModuleBeginStream );
861  //registry.watchPostModuleBeginStream( this, & FastTimerService::postModuleBeginStream );
862  //registry.watchPreModuleEndStream( this, & FastTimerService::preModuleEndStream );
863  //registry.watchPostModuleEndStream( this, & FastTimerService::postModuleEndStream );
880  //registry.watchPreModuleEventPrefetching( this, & FastTimerService::preModuleEventPrefetching );
881  //registry.watchPostModuleEventPrefetching( this, & FastTimerService::postModuleEventPrefetching );
892 }
void watchPostModuleGlobalEndLumi(PostModuleGlobalEndLumi::slot_type const &iSlot)
void preGlobalBeginRun(edm::GlobalContext const &)
void preModuleEventDelayedGet(edm::StreamContext const &, edm::ModuleCallingContext const &)
const bool print_run_summary_
void watchPreModuleGlobalBeginRun(PreModuleGlobalBeginRun::slot_type const &iSlot)
void watchPreEvent(PreEvent::slot_type const &iSlot)
void postGlobalEndLumi(edm::GlobalContext const &)
void postStreamEndLumi(edm::StreamContext const &)
std::vector< edm::ParameterSet > highlight_module_psets_
void postModuleGlobalEndLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void preEventReadFromSource(edm::StreamContext const &, edm::ModuleCallingContext const &)
void preBeginJob(edm::PathsAndConsumesOfModulesBase const &, edm::ProcessContext const &)
void watchPrePathEvent(PrePathEvent::slot_type const &iSlot)
void preSourceLumi(edm::LuminosityBlockIndex)
void watchPreallocate(Preallocate::slot_type const &iSlot)
unsigned int concurrent_threads_
void postEventReadFromSource(edm::StreamContext const &, edm::ModuleCallingContext const &)
void watchPreESModule(PreESModule::slot_type const &iSlot)
void watchPreModuleEventAcquire(PreModuleEventAcquire::slot_type const &iSlot)
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
const PlotRanges dqm_event_ranges_
void postModuleGlobalEndRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void preSourceRun(edm::RunIndex)
void postModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
std::vector< GroupOfModules > highlight_modules_
const bool write_json_summary_
void watchPreModuleEvent(PreModuleEvent::slot_type const &iSlot)
void watchPostEvent(PostEvent::slot_type const &iSlot)
void preESModule(edm::eventsetup::EventSetupRecordKey const &, edm::ESModuleCallingContext const &)
const std::string json_filename_
void watchPreSourceConstruction(PreSourceConstruction::slot_type const &iSlot)
const bool enable_dqm_bynproc_
void postESModule(edm::eventsetup::EventSetupRecordKey const &, edm::ESModuleCallingContext const &)
unsigned int concurrent_runs_
void watchPostStreamEndLumi(PostStreamEndLumi::slot_type const &iSlot)
void watchPreGlobalBeginLumi(PreGlobalBeginLumi::slot_type const &iSlot)
void watchPreEventReadFromSource(PreEventReadFromSource::slot_type const &iSlot)
void watchPostPathEvent(PostPathEvent::slot_type const &iSlot)
void watchPostModuleEvent(PostModuleEvent::slot_type const &iSlot)
void watchPostModuleGlobalBeginLumi(PostModuleGlobalBeginLumi::slot_type const &iSlot)
void watchPostModuleStreamEndLumi(PostModuleStreamEndLumi::slot_type const &iSlot)
void watchPostModuleStreamBeginRun(PostModuleStreamBeginRun::slot_type const &iSlot)
void watchPostSourceEvent(PostSourceEvent::slot_type const &iSlot)
void postSourceRun(edm::RunIndex)
Definition: config.py:1
void postPathEvent(edm::StreamContext const &, edm::PathContext const &, edm::HLTPathStatus const &)
void preModuleGlobalBeginLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void watchPostESModule(PostESModule::slot_type const &iSlot)
const bool print_job_summary_
void watchPreModuleGlobalEndRun(PreModuleGlobalEndRun::slot_type const &iSlot)
const bool enable_dqm_bypath_
const PlotRanges dqm_path_ranges_
void postModuleStreamEndLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
void prePathEvent(edm::StreamContext const &, edm::PathContext const &)
void watchPostSourceRun(PostSourceRun::slot_type const &iSlot)
void watchPreSourceLumi(PreSourceLumi::slot_type const &iSlot)
void preModuleStreamEndLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
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 &)
void watchPostModuleEventAcquire(PostModuleEventAcquire::slot_type const &iSlot)
unsigned int concurrent_lumis_
std::string dqm_path_
void watchPostGlobalEndLumi(PostGlobalEndLumi::slot_type const &iSlot)
const bool enable_dqm_transitions_
void watchPreSourceRun(PreSourceRun::slot_type const &iSlot)
void watchPostStreamEndRun(PostStreamEndRun::slot_type const &iSlot)
const bool enable_dqm_bymodule_
void watchPostModuleStreamEndRun(PostModuleStreamEndRun::slot_type const &iSlot)
void watchPreModuleGlobalBeginLumi(PreModuleGlobalBeginLumi::slot_type const &iSlot)
void watchPreGlobalBeginRun(PreGlobalBeginRun::slot_type const &iSlot)
void watchPreModuleStreamBeginLumi(PreModuleStreamBeginLumi::slot_type const &iSlot)
const PlotRanges dqm_module_ranges_
const bool enable_dqm_byls_
void postModuleEventAcquire(edm::StreamContext const &, edm::ModuleCallingContext const &)
void postModuleEventDelayedGet(edm::StreamContext const &, edm::ModuleCallingContext const &)
const bool print_event_summary_
void watchPostSourceLumi(PostSourceLumi::slot_type const &iSlot)
void watchPostModuleEventDelayedGet(PostModuleEventDelayedGet::slot_type const &iSlot)
void watchPostModuleGlobalEndRun(PostModuleGlobalEndRun::slot_type const &iSlot)
void watchPostModuleStreamBeginLumi(PostModuleStreamBeginLumi::slot_type const &iSlot)
void postModuleStreamBeginLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
void preModuleStreamEndRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
void postModuleStreamEndRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
void watchPreModuleStreamEndLumi(PreModuleStreamEndLumi::slot_type const &iSlot)
void watchPreModuleStreamBeginRun(PreModuleStreamBeginRun::slot_type const &iSlot)
void postModuleStreamBeginRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
void watchPostGlobalEndRun(PostGlobalEndRun::slot_type const &iSlot)
void preSourceEvent(edm::StreamID)
void watchPreStreamBeginLumi(PreStreamBeginLumi::slot_type const &iSlot)
void preEvent(edm::StreamContext const &)
void watchPreBeginJob(PreBeginJob::slot_type const &iSlot)
convenience function for attaching to signal
void preStreamBeginLumi(edm::StreamContext const &)
void postSourceEvent(edm::StreamID)
void preModuleStreamBeginLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
void preModuleStreamBeginRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
void watchPreStreamBeginRun(PreStreamBeginRun::slot_type const &iSlot)
void watchPreModuleStreamEndRun(PreModuleStreamEndRun::slot_type const &iSlot)
void preModuleGlobalEndLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void watchPostEventReadFromSource(PostEventReadFromSource::slot_type const &iSlot)
void watchPostModuleGlobalBeginRun(PostModuleGlobalBeginRun::slot_type const &iSlot)
void preGlobalBeginLumi(edm::GlobalContext const &)
void preSourceConstruction(edm::ModuleDescription const &)
void preModuleEventAcquire(edm::StreamContext const &, edm::ModuleCallingContext const &)
void preModuleGlobalEndRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void postSourceLumi(edm::LuminosityBlockIndex)
void postModuleGlobalBeginRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void watchPreSourceEvent(PreSourceEvent::slot_type const &iSlot)
ProcessCallGraph callgraph_
void postModuleGlobalBeginLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void preStreamBeginRun(edm::StreamContext const &)
void preModuleGlobalBeginRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
unsigned int concurrent_streams_
void watchPreModuleGlobalEndLumi(PreModuleGlobalEndLumi::slot_type const &iSlot)
void preallocate(edm::service::SystemBounds const &)
void watchPostBeginJob(PostBeginJob::slot_type const &iSlot)
convenience function for attaching to signal

◆ ~FastTimerService()

FastTimerService::~FastTimerService ( )
overridedefault

Member Function Documentation

◆ encodeToJSON() [1/3]

template<typename T >
json FastTimerService::encodeToJSON ( std::string const &  type,
std::string const &  label,
unsigned int  events,
T const &  data 
) const
private

◆ encodeToJSON() [2/3]

json FastTimerService::encodeToJSON ( edm::ModuleDescription const &  module,
ResourcesPerModule const &  data 
) const
private

Definition at line 1395 of file FastTimerService.cc.

References data, and callgraph::module.

1395  {
1396  return encodeToJSON(module.moduleName(), module.moduleLabel(), data.events, data.total);
1397 }
json encodeToJSON(std::string const &type, std::string const &label, unsigned int events, T const &data) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79

◆ encodeToJSON() [3/3]

template<typename T >
json FastTimerService::encodeToJSON ( std::string const &  type,
std::string const &  label,
unsigned int  events,
T const &  data 
) const

Definition at line 1382 of file FastTimerService.cc.

References data, events, and label.

1385  {
1386  return json{{"type", type},
1387  {"label", label},
1388  {"events", events},
1389  {"time_thread", ms(data.time_thread)},
1390  {"time_real", ms(data.time_real)},
1391  {"mem_alloc", kB(data.allocated)},
1392  {"mem_free", kB(data.deallocated)}};
1393 }
nlohmann::json json
char const * label
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
int events

◆ fillDescriptions()

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

Definition at line 1780 of file FastTimerService.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::addUntracked(), submitPVResolutionJobs::desc, and AlCaHLTBitMon_QueryRunRegistry::string.

1780  {
1782  desc.addUntracked<bool>("printEventSummary", false);
1783  desc.addUntracked<bool>("printRunSummary", true);
1784  desc.addUntracked<bool>("printJobSummary", true);
1785  // JSON configuration
1786  //desc.addUntracked<bool>("writeJSONByEvent", false);
1787  //desc.addUntracked<bool>("writeJSONByLumiSection", false);
1788  //desc.addUntracked<bool>("writeJSONByRun", false);
1789  desc.addUntracked<bool>("writeJSONSummary", false);
1790  desc.addUntracked<std::string>("jsonFileName", "resources.json");
1791  // DQM configuration
1792  desc.addUntracked<bool>("enableDQM", true);
1793  desc.addUntracked<bool>("enableDQMbyModule", false);
1794  desc.addUntracked<bool>("enableDQMbyPath", false);
1795  desc.addUntracked<bool>("enableDQMbyLumiSection", false);
1796  desc.addUntracked<bool>("enableDQMbyProcesses", false);
1797  desc.addUntracked<bool>("enableDQMTransitions", false);
1798  desc.addUntracked<double>("dqmTimeRange", 1000.); // ms
1799  desc.addUntracked<double>("dqmTimeResolution", 5.); // ms
1800  desc.addUntracked<double>("dqmMemoryRange", 1000000.); // kB
1801  desc.addUntracked<double>("dqmMemoryResolution", 5000.); // kB
1802  desc.addUntracked<double>("dqmPathTimeRange", 100.); // ms
1803  desc.addUntracked<double>("dqmPathTimeResolution", 0.5); // ms
1804  desc.addUntracked<double>("dqmPathMemoryRange", 1000000.); // kB
1805  desc.addUntracked<double>("dqmPathMemoryResolution", 5000.); // kB
1806  desc.addUntracked<double>("dqmModuleTimeRange", 40.); // ms
1807  desc.addUntracked<double>("dqmModuleTimeResolution", 0.2); // ms
1808  desc.addUntracked<double>("dqmModuleMemoryRange", 100000.); // kB
1809  desc.addUntracked<double>("dqmModuleMemoryResolution", 500.); // kB
1810  desc.addUntracked<unsigned>("dqmLumiSectionsRange", 2500); // ~ 16 hours
1811  desc.addUntracked<std::string>("dqmPath", "HLT/TimerService");
1812 
1813  edm::ParameterSetDescription highlightModulesDescription;
1814  highlightModulesDescription.addUntracked<std::vector<std::string>>("modules", {});
1815  highlightModulesDescription.addUntracked<std::string>("label", "producers");
1816  desc.addVPSetUntracked("highlightModules", highlightModulesDescription, {});
1817 
1818  // # OBSOLETE - these parameters are ignored, they are left only not to break old configurations
1819  // they will not be printed in the generated cfi.py file
1820  desc.addOptionalNode(edm::ParameterDescription<bool>("useRealTimeClock", true, false), false)
1821  ->setComment("This parameter is obsolete and will be ignored.");
1822  desc.addOptionalNode(edm::ParameterDescription<bool>("enableTimingPaths", true, false), false)
1823  ->setComment("This parameter is obsolete and will be ignored.");
1824  desc.addOptionalNode(edm::ParameterDescription<bool>("enableTimingModules", true, false), false)
1825  ->setComment("This parameter is obsolete and will be ignored.");
1826  desc.addOptionalNode(edm::ParameterDescription<bool>("enableTimingExclusive", false, false), false)
1827  ->setComment("This parameter is obsolete and will be ignored.");
1828  desc.addOptionalNode(edm::ParameterDescription<bool>("enableTimingSummary", false, false), false)
1829  ->setComment("This parameter is obsolete and will be ignored.");
1830  desc.addOptionalNode(edm::ParameterDescription<bool>("skipFirstPath", false, false), false)
1831  ->setComment("This parameter is obsolete and will be ignored.");
1832  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathActive", false, false), false)
1833  ->setComment("This parameter is obsolete and will be ignored.");
1834  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathTotal", true, false), false)
1835  ->setComment("This parameter is obsolete and will be ignored.");
1836  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathOverhead", false, false), false)
1837  ->setComment("This parameter is obsolete and will be ignored.");
1838  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathDetails", false, false), false)
1839  ->setComment("This parameter is obsolete and will be ignored.");
1840  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathCounters", true, false), false)
1841  ->setComment("This parameter is obsolete and will be ignored.");
1842  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyPathExclusive", false, false), false)
1843  ->setComment("This parameter is obsolete and will be ignored.");
1844  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMbyModuleType", false, false), false)
1845  ->setComment("This parameter is obsolete and will be ignored.");
1846  desc.addOptionalNode(edm::ParameterDescription<bool>("enableDQMSummary", false, false), false)
1847  ->setComment("This parameter is obsolete and will be ignored.");
1848 
1849  descriptions.add("FastTimerService", desc);
1850 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ fixForDQM()

void FastTimerService::fixForDQM ( std::string &  label)
static

Definition at line 949 of file FastTimerService.cc.

References c, label, and alignCSCRings::s.

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

949  {
950  // clean characters that are deemed unsafe for DQM
951  // see the definition of `s_safe` in DQMServices/Core/src/DQMStore.cc
952  static const auto safe_for_dqm = "/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+=_()# "s;
953  for (auto& c : label)
954  if (safe_for_dqm.find(c) == std::string::npos)
955  c = '_';
956 }
char const * label

◆ ignoredSignal()

void FastTimerService::ignoredSignal ( const std::string &  signal) const
private

Definition at line 894 of file FastTimerService.cc.

References LogDebug.

894  {
895  LogDebug("FastTimerService") << "The FastTimerService received is currently not monitoring the signal \"" << signal
896  << "\".\n";
897 }
#define LogDebug(id)

◆ isFirstSubprocess() [1/2]

bool FastTimerService::isFirstSubprocess ( edm::StreamContext const &  )
private

◆ isFirstSubprocess() [2/2]

bool FastTimerService::isFirstSubprocess ( edm::GlobalContext const &  )
private

◆ isLastSubprocess()

bool FastTimerService::isLastSubprocess ( std::atomic< unsigned int > &  check)
private

Definition at line 1438 of file FastTimerService.cc.

References RPCNoise_example::check.

1438  {
1439  // release-acquire semantic guarantees that all writes in this and other threads are visible
1440  // after this operation; full sequentially-consistent ordering is (probably) not needed.
1441  unsigned int old_value = check.fetch_add(1, std::memory_order_acq_rel);
1442  return (old_value == callgraph_.processes().size() - 1);
1443 }
std::vector< ProcessType > const & processes() const
ProcessCallGraph callgraph_

◆ on_scheduler_entry()

void FastTimerService::on_scheduler_entry ( bool  worker)
finalprivate

Definition at line 1768 of file FastTimerService.cc.

References guard_, FastTimerService::Measurement::measure(), overhead_, FastTimerService::ThreadGuard::register_thread(), and thread().

1768  {
1770  // initialise the measurement point for a thread that has newly joined the TBB pool
1771  thread().measure();
1772  }
1773 }
AtomicResources overhead_
Measurement & thread()
bool register_thread(FastTimerService::AtomicResources &r)

◆ on_scheduler_exit()

void FastTimerService::on_scheduler_exit ( bool  worker)
finalprivate

Definition at line 1775 of file FastTimerService.cc.

1775 {}

◆ postBeginJob()

void FastTimerService::postBeginJob ( )
private

Definition at line 996 of file FastTimerService.cc.

References watchdog::group, mps_fire::i, label, SummaryClient_cfi::labels, LogMessageMonitor_cff::modules, jetsAK4_CHS_cff::sort, AlCaHLTBitMon_QueryRunRegistry::string, and groupFilesInBlocks::temp.

996  {
997  unsigned int modules = callgraph_.size();
998 
999  // module highlights
1000  for (unsigned int group : boost::irange(0ul, highlight_module_psets_.size())) {
1001  // copy and sort for faster search via std::binary_search
1002  auto labels = highlight_module_psets_[group].getUntrackedParameter<std::vector<std::string>>("modules");
1003  std::sort(labels.begin(), labels.end());
1004 
1005  highlight_modules_[group].label = highlight_module_psets_[group].getUntrackedParameter<std::string>("label");
1006  highlight_modules_[group].modules.reserve(labels.size());
1007  // convert the module labels in module ids
1008  for (unsigned int i = 0; i < modules; ++i) {
1009  auto const& label = callgraph_.module(i).moduleLabel();
1010  if (std::binary_search(labels.begin(), labels.end(), label))
1011  highlight_modules_[group].modules.push_back(i);
1012  }
1013  }
1014  highlight_module_psets_.clear();
1015 
1016  // allocate the resource counters for each stream, process, path and module
1017  ResourcesPerJob temp(callgraph_, highlight_modules_);
1020  job_summary_ = temp;
1021 
1022  // check that the DQMStore service is available
1023  if (enable_dqm_ and not edm::Service<dqm::legacy::DQMStore>().isAvailable()) {
1024  // the DQMStore is not available, disable all DQM plots
1025  enable_dqm_ = false;
1026  edm::LogWarning("FastTimerService") << "The DQMStore is not avalable, the DQM plots will not be generated";
1027  }
1028 
1029  // allocate the structures to hold pointers to the DQM plots
1030  if (enable_dqm_) {
1031  plots_ = std::make_unique<PlotsPerJob>(callgraph_, highlight_modules_);
1032  }
1033 }
std::vector< edm::ParameterSet > highlight_module_psets_
std::vector< GroupOfModules > highlight_modules_
ResourcesPerJob job_summary_
unsigned int concurrent_runs_
std::vector< ResourcesPerJob > streams_
edm::ModuleDescription const & module(unsigned int module) const
char const * label
std::vector< ResourcesPerJob > run_summary_
unsigned int size() const
std::unique_ptr< PlotsPerJob > plots_
Log< level::Warning, false > LogWarning
ProcessCallGraph callgraph_
std::string const & moduleLabel() const
unsigned int concurrent_streams_

◆ postEndJob()

void FastTimerService::postEndJob ( )
private

Definition at line 1116 of file FastTimerService.cc.

References MillePedeFileConverter_cfg::out, and SiStripPI::printSummary().

1116  {
1117  // stop observing to avoid potential race conditions at exit
1118  tbb::task_scheduler_observer::observe(false);
1119  guard_.finalize();
1120  if (print_job_summary_) {
1121  edm::LogVerbatim out("FastReport");
1122  printSummary(out, job_summary_, "Job");
1123  }
1124  if (write_json_summary_) {
1126  }
1127 }
void printSummary(T &out, ResourcesPerJob const &data, std::string const &label) const
void writeSummaryJSON(ResourcesPerJob const &data, std::string const &filename) const
const bool write_json_summary_
ResourcesPerJob job_summary_
const std::string json_filename_
const bool print_job_summary_

◆ postESModule()

void FastTimerService::postESModule ( edm::eventsetup::EventSetupRecordKey const &  ,
edm::ESModuleCallingContext const &  cc 
)
private

Definition at line 1706 of file FastTimerService.cc.

References edm::ESModuleCallingContext::getTopModuleCallingContext(), edm::ParentContext::kPlaceInPath, edm::ModuleCallingContext::parent(), edm::PlaceInPathContext::pathContext(), edm::ParentContext::placeInPathContext(), cms::cuda::stream, edm::PathContext::streamContext(), edm::StreamContext::streamID(), and edm::StreamID::value().

1707  {
1708  auto top = cc.getTopModuleCallingContext();
1709  if (top->type() == edm::ParentContext::Type::kPlaceInPath) {
1710  unsigned int sid = top->parent().placeInPathContext()->pathContext()->streamContext()->streamID().value();
1711  auto& stream = streams_[sid];
1712  thread().measure_and_accumulate(stream.eventsetup);
1713  }
1714 }
std::vector< ResourcesPerJob > streams_
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
Measurement & thread()
void measure_and_accumulate(Resources &store) noexcept

◆ postEvent()

void FastTimerService::postEvent ( edm::StreamContext const &  sc)
private

Definition at line 1447 of file FastTimerService.cc.

References data, edm::StreamContext::eventID(), watchdog::group, mps_fire::i, l1ctLayer2EG_cff::id, dqmdumpme::last, edm::EventID::luminosityBlock(), MillePedeFileConverter_cfg::out, LaserDQM_cfg::process, edm::StreamContext::processContext(), edm::StreamContext::runIndex(), cms::cuda::stream, and edm::StreamContext::streamID().

1447  {
1448  ignoredSignal(__func__);
1449 
1450  unsigned int pid = callgraph_.processId(*sc.processContext());
1451  unsigned int sid = sc.streamID();
1452  auto& stream = streams_[sid];
1453  auto& process = callgraph_.processDescription(pid);
1454 
1455  // measure the event resources as the sum of all modules' resources
1456  auto& data = stream.processes[pid].total;
1457  for (unsigned int id : process.modules_)
1458  data += stream.modules[id].total;
1459  stream.total += data;
1460 
1461  // handle the summaries and fill the plots only after the last subprocess has run
1463  if (not last)
1464  return;
1465 
1466  // measure the event resources explicitly
1467  stream.event_measurement.measure_and_store(stream.event);
1468 
1469  // add to the event resources those used by source (which is not part of any process)
1470  unsigned int id = 0;
1471  stream.total += stream.modules[id].total;
1472 
1473  // highlighted modules
1474  for (unsigned int group : boost::irange(0ul, highlight_modules_.size()))
1475  for (unsigned int i : highlight_modules_[group].modules)
1476  stream.highlight[group] += stream.modules[i].total;
1477 
1478  // avoid concurrent access to the summary objects
1479  {
1480  std::lock_guard<std::mutex> guard(summary_mutex_);
1481  job_summary_ += stream;
1482  run_summary_[sc.runIndex()] += stream;
1483  }
1484 
1485  if (print_event_summary_) {
1486  edm::LogVerbatim out("FastReport");
1487  printEvent(out, stream);
1488  }
1489 
1490  if (enable_dqm_) {
1491  plots_->fill(callgraph_, stream, sc.eventID().luminosityBlock());
1492  }
1493 }
std::vector< GroupOfModules > highlight_modules_
ResourcesPerJob job_summary_
std::vector< ResourcesPerJob > streams_
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
std::mutex summary_mutex_
void printEvent(T &out, ResourcesPerJob const &) const
std::vector< ResourcesPerJob > run_summary_
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_event_check_
unsigned int processId(edm::ProcessContext const &) const
void ignoredSignal(const std::string &signal) const
const bool print_event_summary_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
std::unique_ptr< PlotsPerJob > plots_
ProcessType const & processDescription(unsigned int) const
ProcessCallGraph callgraph_
bool isLastSubprocess(std::atomic< unsigned int > &check)

◆ postEventReadFromSource()

void FastTimerService::postEventReadFromSource ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1614 of file FastTimerService.cc.

References edm::ModuleDescription::id(), l1ctLayer2EG_cff::id, edm::ModuleCallingContext::kPrefetching, callgraph::module, edm::ModuleCallingContext::state(), cms::cuda::stream, and edm::StreamContext::streamID().

1614  {
1617  unsigned int id = md.id();
1618  auto& stream = streams_[sc.streamID()];
1619  auto& module = stream.modules[id];
1620 
1622  }
1623 }
edm::ModuleDescription const & source() const
std::vector< ResourcesPerJob > streams_
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
Measurement & thread()
unsigned int id() const
void measure_and_accumulate(Resources &store) noexcept
ProcessCallGraph callgraph_

◆ postGlobalBeginLumi()

void FastTimerService::postGlobalBeginLumi ( edm::GlobalContext const &  gc)
private

Definition at line 1052 of file FastTimerService.cc.

1052 { ignoredSignal(__func__); }
void ignoredSignal(const std::string &signal) const

◆ postGlobalBeginRun()

void FastTimerService::postGlobalBeginRun ( edm::GlobalContext const &  gc)
private

Definition at line 945 of file FastTimerService.cc.

945 { ignoredSignal(__func__); }
void ignoredSignal(const std::string &signal) const

◆ postGlobalEndLumi()

void FastTimerService::postGlobalEndLumi ( edm::GlobalContext const &  gc)
private

Definition at line 1056 of file FastTimerService.cc.

References label, dqmdumpme::last, edm::LuminosityBlockID::luminosityBlock(), edm::GlobalContext::luminosityBlockID(), edm::GlobalContext::luminosityBlockIndex(), MillePedeFileConverter_cfg::out, and edm::LuminosityBlockID::run().

1056  {
1057  ignoredSignal(__func__);
1058 
1059  // handle the summaries only after the last subprocess has run
1060  auto index = gc.luminosityBlockIndex();
1062  if (not last)
1063  return;
1064 
1065  edm::LogVerbatim out("FastReport");
1066  auto const& label =
1067  fmt::sprintf("run %d, lumisection %d", gc.luminosityBlockID().run(), gc.luminosityBlockID().luminosityBlock());
1069 
1071  plots_->fill_lumi(lumi_transition_[index], gc.luminosityBlockID().luminosityBlock());
1072  }
1073 }
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_global_lumi_check_
char const * label
const bool enable_dqm_transitions_
void ignoredSignal(const std::string &signal) const
std::unique_ptr< PlotsPerJob > plots_
void printTransition(T &out, AtomicResources const &data, std::string const &label) const
std::vector< AtomicResources > lumi_transition_
bool isLastSubprocess(std::atomic< unsigned int > &check)

◆ postGlobalEndRun()

void FastTimerService::postGlobalEndRun ( edm::GlobalContext const &  gc)
private

Definition at line 1085 of file FastTimerService.cc.

References label, dqmdumpme::last, edm::GlobalContext::luminosityBlockID(), MillePedeFileConverter_cfg::out, SiStripPI::printSummary(), edm::LuminosityBlockID::run(), and edm::GlobalContext::runIndex().

1085  {
1086  ignoredSignal(__func__);
1087 
1088  // handle the summaries only after the last subprocess has run
1089  auto index = gc.runIndex();
1091  if (not last)
1092  return;
1093 
1094  edm::LogVerbatim out("FastReport");
1095  auto const& label = fmt::sprintf("Run %d", gc.luminosityBlockID().run());
1096  if (print_run_summary_) {
1098  }
1100 
1102  plots_->fill_run(run_transition_[index]);
1103  }
1104 }
const bool print_run_summary_
void printSummary(T &out, ResourcesPerJob const &data, std::string const &label) const
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_global_run_check_
char const * label
std::vector< ResourcesPerJob > run_summary_
const bool enable_dqm_transitions_
void ignoredSignal(const std::string &signal) const
std::vector< AtomicResources > run_transition_
std::unique_ptr< PlotsPerJob > plots_
void printTransition(T &out, AtomicResources const &data, std::string const &label) const
bool isLastSubprocess(std::atomic< unsigned int > &check)

◆ postModuleEvent()

void FastTimerService::postModuleEvent ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1576 of file FastTimerService.cc.

References edm::ModuleDescription::id(), l1ctLayer2EG_cff::id, callgraph::module, edm::ModuleCallingContext::moduleDescription(), cms::cuda::stream, edm::StreamContext::streamID(), and edm::StreamID::value().

1576  {
1577  edm::ModuleDescription const& md = *mcc.moduleDescription();
1578  unsigned int id = md.id();
1579  unsigned int sid = sc.streamID().value();
1580  auto& stream = streams_[sid];
1581  auto& module = stream.modules[id];
1582 
1583  if (module.has_acquire) {
1585  } else {
1586  thread().measure_and_store(module.total);
1587  }
1588  ++module.events;
1589 }
std::vector< ResourcesPerJob > streams_
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
Measurement & thread()
unsigned int id() const
void measure_and_store(Resources &store) noexcept
void measure_and_accumulate(Resources &store) noexcept

◆ postModuleEventAcquire()

void FastTimerService::postModuleEventAcquire ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1559 of file FastTimerService.cc.

References edm::ModuleDescription::id(), l1ctLayer2EG_cff::id, callgraph::module, edm::ModuleCallingContext::moduleDescription(), cms::cuda::stream, edm::StreamContext::streamID(), and edm::StreamID::value().

1559  {
1560  edm::ModuleDescription const& md = *mcc.moduleDescription();
1561  unsigned int id = md.id();
1562  unsigned int sid = sc.streamID().value();
1563  auto& stream = streams_[sid];
1564  auto& module = stream.modules[id];
1565 
1566  module.has_acquire = true;
1567  thread().measure_and_store(module.total);
1568 }
std::vector< ResourcesPerJob > streams_
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
Measurement & thread()
unsigned int id() const
void measure_and_store(Resources &store) noexcept

◆ postModuleEventDelayedGet()

void FastTimerService::postModuleEventDelayedGet ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1595 of file FastTimerService.cc.

1595  {
1596  unsupportedSignal(__func__);
1597 }
void unsupportedSignal(const std::string &signal) const

◆ postModuleEventPrefetching()

void FastTimerService::postModuleEventPrefetching ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1603 of file FastTimerService.cc.

1603  {
1604  ignoredSignal(__func__);
1605 }
void ignoredSignal(const std::string &signal) const

◆ postModuleGlobalBeginLumi()

void FastTimerService::postModuleGlobalBeginLumi ( edm::GlobalContext const &  gc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1647 of file FastTimerService.cc.

References edm::GlobalContext::luminosityBlockIndex().

1647  {
1648  auto index = gc.luminosityBlockIndex();
1650 }
Measurement & thread()
void measure_and_accumulate(Resources &store) noexcept
std::vector< AtomicResources > lumi_transition_

◆ postModuleGlobalBeginRun()

void FastTimerService::postModuleGlobalBeginRun ( edm::GlobalContext const &  gc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1629 of file FastTimerService.cc.

References edm::GlobalContext::runIndex().

1629  {
1630  auto index = gc.runIndex();
1632 }
Measurement & thread()
std::vector< AtomicResources > run_transition_
void measure_and_accumulate(Resources &store) noexcept

◆ postModuleGlobalEndLumi()

void FastTimerService::postModuleGlobalEndLumi ( edm::GlobalContext const &  gc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1656 of file FastTimerService.cc.

References edm::GlobalContext::luminosityBlockIndex().

1656  {
1657  auto index = gc.luminosityBlockIndex();
1659 }
Measurement & thread()
void measure_and_accumulate(Resources &store) noexcept
std::vector< AtomicResources > lumi_transition_

◆ postModuleGlobalEndRun()

void FastTimerService::postModuleGlobalEndRun ( edm::GlobalContext const &  gc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1638 of file FastTimerService.cc.

References edm::GlobalContext::runIndex().

1638  {
1639  auto index = gc.runIndex();
1641 }
Measurement & thread()
std::vector< AtomicResources > run_transition_
void measure_and_accumulate(Resources &store) noexcept

◆ postModuleStreamBeginLumi()

void FastTimerService::postModuleStreamBeginLumi ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1683 of file FastTimerService.cc.

References edm::StreamContext::luminosityBlockIndex().

1683  {
1684  auto index = sc.luminosityBlockIndex();
1686 }
Measurement & thread()
void measure_and_accumulate(Resources &store) noexcept
std::vector< AtomicResources > lumi_transition_

◆ postModuleStreamBeginRun()

void FastTimerService::postModuleStreamBeginRun ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1665 of file FastTimerService.cc.

References edm::StreamContext::runIndex().

1665  {
1666  auto index = sc.runIndex();
1668 }
Measurement & thread()
std::vector< AtomicResources > run_transition_
void measure_and_accumulate(Resources &store) noexcept

◆ postModuleStreamEndLumi()

void FastTimerService::postModuleStreamEndLumi ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1692 of file FastTimerService.cc.

References edm::StreamContext::luminosityBlockIndex().

1692  {
1693  auto index = sc.luminosityBlockIndex();
1695 }
Measurement & thread()
void measure_and_accumulate(Resources &store) noexcept
std::vector< AtomicResources > lumi_transition_

◆ postModuleStreamEndRun()

void FastTimerService::postModuleStreamEndRun ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1674 of file FastTimerService.cc.

References edm::StreamContext::runIndex().

1674  {
1675  auto index = sc.runIndex();
1677 }
Measurement & thread()
std::vector< AtomicResources > run_transition_
void measure_and_accumulate(Resources &store) noexcept

◆ postPathEvent()

void FastTimerService::postPathEvent ( edm::StreamContext const &  sc,
edm::PathContext const &  pc,
edm::HLTPathStatus const &  status 
)
private

Definition at line 1529 of file FastTimerService.cc.

References data, mps_fire::i, l1ctLayer2EG_cff::id, edm::PathContext::isEndPath(), callgraph::module, castor_dqm_sourceclient_file_cfg::path, edm::PathContext::pathID(), edm::StreamContext::processContext(), mps_update::status, cms::cuda::stream, edm::StreamContext::streamID(), and edm::StreamID::value().

1531  {
1532  unsigned int sid = sc.streamID().value();
1533  unsigned int pid = callgraph_.processId(*sc.processContext());
1534  unsigned int id = pc.pathID();
1535  auto& stream = streams_[sid];
1536  auto& data = pc.isEndPath() ? stream.processes[pid].endpaths[id] : stream.processes[pid].paths[id];
1537 
1538  auto const& path =
1540  unsigned int index = path.modules_on_path_.empty() ? 0 : status.index() + 1;
1541  data.last = path.modules_on_path_.empty() ? 0 : path.last_dependency_of_module_[status.index()];
1542 
1543  for (unsigned int i = 0; i < index; ++i) {
1544  auto const& module = stream.modules[path.modules_on_path_[i]];
1545  data.active += module.total;
1546  }
1547  for (unsigned int i = 0; i < data.last; ++i) {
1548  auto const& module = stream.modules[path.modules_and_dependencies_[i]];
1549  data.total += module.total;
1550  }
1551 }
std::vector< ResourcesPerJob > streams_
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
std::vector< PathType > paths_
unsigned int processId(edm::ProcessContext const &) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
std::vector< PathType > endPaths_
ProcessType const & processDescription(unsigned int) const
ProcessCallGraph callgraph_

◆ postSourceEvent()

void FastTimerService::postSourceEvent ( edm::StreamID  sid)
private

Definition at line 1509 of file FastTimerService.cc.

References edm::ModuleDescription::id(), l1ctLayer2EG_cff::id, callgraph::module, and cms::cuda::stream.

1509  {
1511  unsigned int id = md.id();
1512  auto& stream = streams_[sid];
1513  auto& module = stream.modules[id];
1514 
1515  thread().measure_and_store(module.total);
1516  ++stream.modules[id].events;
1517 }
edm::ModuleDescription const & source() const
std::vector< ResourcesPerJob > streams_
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
Measurement & thread()
unsigned int id() const
void measure_and_store(Resources &store) noexcept
ProcessCallGraph callgraph_

◆ postSourceLumi()

void FastTimerService::postSourceLumi ( edm::LuminosityBlockIndex  index)
private

Definition at line 1112 of file FastTimerService.cc.

1112  {
1114 }
Measurement & thread()
void measure_and_accumulate(Resources &store) noexcept
std::vector< AtomicResources > lumi_transition_

◆ postSourceRun()

void FastTimerService::postSourceRun ( edm::RunIndex  index)
private

Definition at line 1108 of file FastTimerService.cc.

Measurement & thread()
std::vector< AtomicResources > run_transition_
void measure_and_accumulate(Resources &store) noexcept

◆ postStreamBeginLumi()

void FastTimerService::postStreamBeginLumi ( edm::StreamContext const &  sc)
private

Definition at line 1077 of file FastTimerService.cc.

1077 { ignoredSignal(__func__); }
void ignoredSignal(const std::string &signal) const

◆ postStreamBeginRun()

void FastTimerService::postStreamBeginRun ( edm::StreamContext const &  sc)
private

Definition at line 1035 of file FastTimerService.cc.

1035 { ignoredSignal(__func__); }
void ignoredSignal(const std::string &signal) const

◆ postStreamEndLumi()

void FastTimerService::postStreamEndLumi ( edm::StreamContext const &  sc)
private

Definition at line 1081 of file FastTimerService.cc.

1081 { ignoredSignal(__func__); }
void ignoredSignal(const std::string &signal) const

◆ postStreamEndRun()

void FastTimerService::postStreamEndRun ( edm::StreamContext const &  sc)
private

Definition at line 1039 of file FastTimerService.cc.

1039 { ignoredSignal(__func__); }
void ignoredSignal(const std::string &signal) const

◆ preallocate()

void FastTimerService::preallocate ( edm::service::SystemBounds const &  bounds)
private

Definition at line 958 of file FastTimerService.cc.

References mps_fire::i, and processor_model.

958  {
959  concurrent_lumis_ = bounds.maxNumberOfConcurrentLuminosityBlocks();
960  concurrent_runs_ = bounds.maxNumberOfConcurrentRuns();
961  concurrent_streams_ = bounds.maxNumberOfStreams();
962  concurrent_threads_ = bounds.maxNumberOfThreads();
963 
965  dqm_path_ += fmt::sprintf(
966  "/Running on %s with %d streams on %d threads", processor_model, concurrent_streams_, concurrent_threads_);
967 
968  // fix the DQM path to avoid invalid characters
970 
971  // allocate atomic variables to keep track of the completion of each step, process by process
972  subprocess_event_check_ = std::make_unique<std::atomic<unsigned int>[]>(concurrent_streams_);
973  for (unsigned int i = 0; i < concurrent_streams_; ++i)
975  subprocess_global_run_check_ = std::make_unique<std::atomic<unsigned int>[]>(concurrent_runs_);
976  for (unsigned int i = 0; i < concurrent_runs_; ++i)
978  subprocess_global_lumi_check_ = std::make_unique<std::atomic<unsigned int>[]>(concurrent_lumis_);
979  for (unsigned int i = 0; i < concurrent_lumis_; ++i)
981 
982  // allocate buffers to keep track of the resources spent in the lumi and run transitions
985 }
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_global_lumi_check_
unsigned int concurrent_threads_
const bool enable_dqm_bynproc_
unsigned int concurrent_runs_
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_global_run_check_
const std::string processor_model
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_event_check_
unsigned int concurrent_lumis_
std::string dqm_path_
std::vector< AtomicResources > run_transition_
std::vector< AtomicResources > lumi_transition_
static void fixForDQM(std::string &label)
unsigned int concurrent_streams_

◆ preBeginJob()

void FastTimerService::preBeginJob ( edm::PathsAndConsumesOfModulesBase const &  pathsAndConsumes,
edm::ProcessContext const &  context 
)
private

Definition at line 991 of file FastTimerService.cc.

References visDQMUpload::context.

992  {
993  callgraph_.preBeginJob(pathsAndConsumes, context);
994 }
void preBeginJob(edm::PathsAndConsumesOfModulesBase const &, edm::ProcessContext const &)
ProcessCallGraph callgraph_

◆ preESModule()

void FastTimerService::preESModule ( edm::eventsetup::EventSetupRecordKey const &  ,
edm::ESModuleCallingContext const &  cc 
)
private

Definition at line 1697 of file FastTimerService.cc.

References edm::ESModuleCallingContext::getTopModuleCallingContext(), edm::ParentContext::kPlaceInPath, edm::ModuleCallingContext::parent(), edm::PlaceInPathContext::pathContext(), edm::ParentContext::placeInPathContext(), cms::cuda::stream, edm::PathContext::streamContext(), edm::StreamContext::streamID(), and edm::StreamID::value().

1697  {
1698  auto top = cc.getTopModuleCallingContext();
1699  if (top->type() == edm::ParentContext::Type::kPlaceInPath) {
1700  //Paths are only used when processing an Event
1701  unsigned int sid = top->parent().placeInPathContext()->pathContext()->streamContext()->streamID().value();
1702  auto& stream = streams_[sid];
1703  thread().measure_and_accumulate(stream.overhead);
1704  }
1705 }
std::vector< ResourcesPerJob > streams_
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
Measurement & thread()
void measure_and_accumulate(Resources &store) noexcept

◆ preEvent()

void FastTimerService::preEvent ( edm::StreamContext const &  sc)
private

Definition at line 1445 of file FastTimerService.cc.

1445 { ignoredSignal(__func__); }
void ignoredSignal(const std::string &signal) const

◆ preEventReadFromSource()

void FastTimerService::preEventReadFromSource ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1607 of file FastTimerService.cc.

References edm::ModuleCallingContext::kPrefetching, edm::ModuleCallingContext::state(), cms::cuda::stream, and edm::StreamContext::streamID().

1607  {
1609  auto& stream = streams_[sc.streamID()];
1610  thread().measure_and_accumulate(stream.overhead);
1611  }
1612 }
std::vector< ResourcesPerJob > streams_
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
Measurement & thread()
void measure_and_accumulate(Resources &store) noexcept

◆ preGlobalBeginLumi()

void FastTimerService::preGlobalBeginLumi ( edm::GlobalContext const &  gc)
private

Definition at line 1041 of file FastTimerService.cc.

References edm::GlobalContext::luminosityBlockIndex().

1041  {
1042  ignoredSignal(__func__);
1043 
1044  // reset the lumi counters only during the main process being run
1045  if (isFirstSubprocess(gc)) {
1046  auto index = gc.luminosityBlockIndex();
1048  lumi_transition_[index].reset();
1049  }
1050 }
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_global_lumi_check_
bool isFirstSubprocess(edm::StreamContext const &)
void ignoredSignal(const std::string &signal) const
std::vector< AtomicResources > lumi_transition_

◆ preGlobalBeginRun()

void FastTimerService::preGlobalBeginRun ( edm::GlobalContext const &  gc)
private

Definition at line 907 of file FastTimerService.cc.

References edm::GlobalContext::runIndex(), and dqm::implementation::NavigatorBase::setCurrentFolder().

907  {
908  ignoredSignal(__func__);
909 
910  // reset the run counters only during the main process being run
911  if (isFirstSubprocess(gc)) {
912  auto index = gc.runIndex();
914  run_transition_[index].reset();
915  run_summary_[index].reset();
916 
917  // book the DQM plots
918  if (enable_dqm_) {
919  // define a callback to book the MonitorElements
920  auto bookTransactionCallback = [&, this](dqm::reco::DQMStore::IBooker& booker, dqm::reco::DQMStore::IGetter&) {
921  auto scope = dqm::reco::DQMStore::IBooker::UseRunScope(booker);
922  // we should really do this, but only DQMStore is allowed to touch it
923  // We could move to postGlobalBeginRun, then the DQMStore has sure set it up.
924  //booker.setRunLumi(gc.luminosityBlockID());
925  booker.setCurrentFolder(dqm_path_);
926  plots_->book(booker,
927  callgraph_,
937  };
938 
939  // book MonitorElements for this stream
940  edm::Service<dqm::legacy::DQMStore>()->meBookerGetter(bookTransactionCallback);
941  }
942  }
943 }
const PlotRanges dqm_event_ranges_
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
std::vector< GroupOfModules > highlight_modules_
bool isFirstSubprocess(edm::StreamContext const &)
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_global_run_check_
const bool enable_dqm_bypath_
const PlotRanges dqm_path_ranges_
std::vector< ResourcesPerJob > run_summary_
const unsigned int dqm_lumisections_range_
std::string dqm_path_
const bool enable_dqm_transitions_
void ignoredSignal(const std::string &signal) const
const bool enable_dqm_bymodule_
const PlotRanges dqm_module_ranges_
const bool enable_dqm_byls_
std::vector< AtomicResources > run_transition_
std::unique_ptr< PlotsPerJob > plots_
UseScope< MonitorElementData::Scope::RUN > UseRunScope
Definition: DQMStore.h:541
ProcessCallGraph callgraph_

◆ preGlobalEndLumi()

void FastTimerService::preGlobalEndLumi ( edm::GlobalContext const &  gc)
private

Definition at line 1054 of file FastTimerService.cc.

1054 { ignoredSignal(__func__); }
void ignoredSignal(const std::string &signal) const

◆ preGlobalEndRun()

void FastTimerService::preGlobalEndRun ( edm::GlobalContext const &  gc)
private

Definition at line 1083 of file FastTimerService.cc.

1083 { ignoredSignal(__func__); }
void ignoredSignal(const std::string &signal) const

◆ preModuleEvent()

void FastTimerService::preModuleEvent ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1570 of file FastTimerService.cc.

References cms::cuda::stream, edm::StreamContext::streamID(), and edm::StreamID::value().

1570  {
1571  unsigned int sid = sc.streamID().value();
1572  auto& stream = streams_[sid];
1573  thread().measure_and_accumulate(stream.overhead);
1574 }
std::vector< ResourcesPerJob > streams_
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
Measurement & thread()
void measure_and_accumulate(Resources &store) noexcept

◆ preModuleEventAcquire()

void FastTimerService::preModuleEventAcquire ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1553 of file FastTimerService.cc.

References cms::cuda::stream, edm::StreamContext::streamID(), and edm::StreamID::value().

1553  {
1554  unsigned int sid = sc.streamID().value();
1555  auto& stream = streams_[sid];
1556  thread().measure_and_accumulate(stream.overhead);
1557 }
std::vector< ResourcesPerJob > streams_
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
Measurement & thread()
void measure_and_accumulate(Resources &store) noexcept

◆ preModuleEventDelayedGet()

void FastTimerService::preModuleEventDelayedGet ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1591 of file FastTimerService.cc.

1591  {
1592  unsupportedSignal(__func__);
1593 }
void unsupportedSignal(const std::string &signal) const

◆ preModuleEventPrefetching()

void FastTimerService::preModuleEventPrefetching ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1599 of file FastTimerService.cc.

1599  {
1600  ignoredSignal(__func__);
1601 }
void ignoredSignal(const std::string &signal) const

◆ preModuleGlobalBeginLumi()

void FastTimerService::preModuleGlobalBeginLumi ( edm::GlobalContext const &  gc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1643 of file FastTimerService.cc.

1643  {
1645 }
AtomicResources overhead_
Measurement & thread()
void measure_and_accumulate(Resources &store) noexcept

◆ preModuleGlobalBeginRun()

void FastTimerService::preModuleGlobalBeginRun ( edm::GlobalContext const &  gc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1625 of file FastTimerService.cc.

1625  {
1627 }
AtomicResources overhead_
Measurement & thread()
void measure_and_accumulate(Resources &store) noexcept

◆ preModuleGlobalEndLumi()

void FastTimerService::preModuleGlobalEndLumi ( edm::GlobalContext const &  gc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1652 of file FastTimerService.cc.

1652  {
1654 }
AtomicResources overhead_
Measurement & thread()
void measure_and_accumulate(Resources &store) noexcept

◆ preModuleGlobalEndRun()

void FastTimerService::preModuleGlobalEndRun ( edm::GlobalContext const &  gc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1634 of file FastTimerService.cc.

1634  {
1636 }
AtomicResources overhead_
Measurement & thread()
void measure_and_accumulate(Resources &store) noexcept

◆ preModuleStreamBeginLumi()

void FastTimerService::preModuleStreamBeginLumi ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1679 of file FastTimerService.cc.

1679  {
1681 }
AtomicResources overhead_
Measurement & thread()
void measure_and_accumulate(Resources &store) noexcept

◆ preModuleStreamBeginRun()

void FastTimerService::preModuleStreamBeginRun ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1661 of file FastTimerService.cc.

1661  {
1663 }
AtomicResources overhead_
Measurement & thread()
void measure_and_accumulate(Resources &store) noexcept

◆ preModuleStreamEndLumi()

void FastTimerService::preModuleStreamEndLumi ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1688 of file FastTimerService.cc.

1688  {
1690 }
AtomicResources overhead_
Measurement & thread()
void measure_and_accumulate(Resources &store) noexcept

◆ preModuleStreamEndRun()

void FastTimerService::preModuleStreamEndRun ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 1670 of file FastTimerService.cc.

1670  {
1672 }
AtomicResources overhead_
Measurement & thread()
void measure_and_accumulate(Resources &store) noexcept

◆ prePathEvent()

void FastTimerService::prePathEvent ( edm::StreamContext const &  sc,
edm::PathContext const &  pc 
)
private

Definition at line 1519 of file FastTimerService.cc.

References data, l1ctLayer2EG_cff::id, edm::PathContext::isEndPath(), edm::PathContext::pathID(), edm::StreamContext::processContext(), cms::cuda::stream, edm::StreamContext::streamID(), and edm::StreamID::value().

1519  {
1520  unsigned int sid = sc.streamID().value();
1521  unsigned int pid = callgraph_.processId(*sc.processContext());
1522  unsigned int id = pc.pathID();
1523  auto& stream = streams_[sid];
1524  auto& data = pc.isEndPath() ? stream.processes[pid].endpaths[id] : stream.processes[pid].paths[id];
1525  data.status = false;
1526  data.last = 0;
1527 }
std::vector< ResourcesPerJob > streams_
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
unsigned int processId(edm::ProcessContext const &) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
ProcessCallGraph callgraph_

◆ preSourceConstruction()

void FastTimerService::preSourceConstruction ( edm::ModuleDescription const &  module)
private

Definition at line 987 of file FastTimerService.cc.

References callgraph::module.

987  {
989 }
void preSourceConstruction(edm::ModuleDescription const &)
ProcessCallGraph callgraph_

◆ preSourceEvent()

void FastTimerService::preSourceEvent ( edm::StreamID  sid)
private

Definition at line 1495 of file FastTimerService.cc.

References cms::cuda::stream.

1495  {
1496  // clear the event counters
1497  auto& stream = streams_[sid];
1498  stream.reset();
1499  ++stream.events;
1500 
1501  subprocess_event_check_[sid] = 0;
1502 
1503  // reuse the same measurement for the Source module and for the explicit begin of the Event
1504  auto& measurement = thread();
1505  measurement.measure_and_accumulate(stream.overhead);
1506  stream.event_measurement = measurement;
1507 }
std::vector< ResourcesPerJob > streams_
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
Measurement & thread()
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_event_check_

◆ preSourceLumi()

void FastTimerService::preSourceLumi ( edm::LuminosityBlockIndex  index)
private

Definition at line 1110 of file FastTimerService.cc.

AtomicResources overhead_
Measurement & thread()
void measure_and_accumulate(Resources &store) noexcept

◆ preSourceRun()

void FastTimerService::preSourceRun ( edm::RunIndex  index)
private

Definition at line 1106 of file FastTimerService.cc.

AtomicResources overhead_
Measurement & thread()
void measure_and_accumulate(Resources &store) noexcept

◆ preStreamBeginLumi()

void FastTimerService::preStreamBeginLumi ( edm::StreamContext const &  sc)
private

Definition at line 1075 of file FastTimerService.cc.

1075 { ignoredSignal(__func__); }
void ignoredSignal(const std::string &signal) const

◆ preStreamBeginRun()

void FastTimerService::preStreamBeginRun ( edm::StreamContext const &  sc)
private

Definition at line 947 of file FastTimerService.cc.

947 { ignoredSignal(__func__); }
void ignoredSignal(const std::string &signal) const

◆ preStreamEndLumi()

void FastTimerService::preStreamEndLumi ( edm::StreamContext const &  sc)
private

Definition at line 1079 of file FastTimerService.cc.

1079 { ignoredSignal(__func__); }
void ignoredSignal(const std::string &signal) const

◆ preStreamEndRun()

void FastTimerService::preStreamEndRun ( edm::StreamContext const &  sc)
private

Definition at line 1037 of file FastTimerService.cc.

1037 { ignoredSignal(__func__); }
void ignoredSignal(const std::string &signal) const

◆ printEvent() [1/2]

template<typename T >
void FastTimerService::printEvent ( T out,
ResourcesPerJob const &   
) const
private

◆ printEvent() [2/2]

template<typename T >
void FastTimerService::printEvent ( T out,
ResourcesPerJob const &  data 
) const

Definition at line 1169 of file FastTimerService.cc.

References data, watchdog::group, mps_fire::i, visualization-live-secondInstance_cfg::m, callgraph::module, Skims_PA_cff::name, MillePedeFileConverter_cfg::out, AlCaHLTBitMon_ParallelJobs::p, castor_dqm_sourceclient_file_cfg::path, ValidateTausOnZEEFastSim_cff::proc, and source.

1169  {
1170  printHeader(out, "Event");
1171  printEventHeader(out, "Modules");
1172  auto const& source_d = callgraph_.source();
1173  auto const& source = data.modules[source_d.id()];
1174  printEventLine(out, source.total, source_d.moduleLabel());
1175  for (unsigned int i = 0; i < callgraph_.processes().size(); ++i) {
1176  auto const& proc_d = callgraph_.processDescription(i);
1177  auto const& proc = data.processes[i];
1178  printEventLine(out, proc.total, "process " + proc_d.name_);
1179  for (unsigned int m : proc_d.modules_) {
1180  auto const& module_d = callgraph_.module(m);
1181  auto const& module = data.modules[m];
1182  printEventLine(out, module.total, " " + module_d.moduleLabel());
1183  }
1184  }
1185  printEventLine(out, data.total, "total");
1186  out << '\n';
1187  printEventHeader(out, "Processes and Paths");
1188  printEventLine(out, source.total, source_d.moduleLabel());
1189  for (unsigned int i = 0; i < callgraph_.processes().size(); ++i) {
1190  auto const& proc_d = callgraph_.processDescription(i);
1191  auto const& proc = data.processes[i];
1192  printEventLine(out, proc.total, "process " + proc_d.name_);
1193  for (unsigned int p = 0; p < proc.paths.size(); ++p) {
1194  auto const& name = proc_d.paths_[p].name_;
1195  auto const& path = proc.paths[p];
1196  printEventLine(out, path.active, name + " (only scheduled modules)");
1197  printEventLine(out, path.total, name + " (including dependencies)");
1198  }
1199  for (unsigned int p = 0; p < proc.endpaths.size(); ++p) {
1200  auto const& name = proc_d.endPaths_[p].name_;
1201  auto const& path = proc.endpaths[p];
1202  printEventLine(out, path.active, name + " (only scheduled modules)");
1203  printEventLine(out, path.total, name + " (including dependencies)");
1204  }
1205  }
1206  printEventLine(out, data.total, "total");
1207  out << '\n';
1208  for (unsigned int group : boost::irange(0ul, highlight_modules_.size())) {
1209  printEventHeader(out, "Highlighted modules");
1210  for (unsigned int m : highlight_modules_[group].modules) {
1211  auto const& module_d = callgraph_.module(m);
1212  auto const& module = data.modules[m];
1213  printEventLine(out, module.total, " " + module_d.moduleLabel());
1214  }
1215  printEventLine(out, data.highlight[group], highlight_modules_[group].label);
1216  out << '\n';
1217  }
1218 }
std::vector< GroupOfModules > highlight_modules_
edm::ModuleDescription const & source() const
edm::ModuleDescription const & module(unsigned int module) const
std::vector< ProcessType > const & processes() const
void printEventHeader(T &out, std::string const &label) const
void printEventLine(T &out, Resources const &data, std::string const &label) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
void printHeader(T &out, std::string const &label) const
ProcessType const & processDescription(unsigned int) const
ProcessCallGraph callgraph_
static std::string const source
Definition: EdmProvDump.cc:49

◆ printEventHeader() [1/2]

template<typename T >
void FastTimerService::printEventHeader ( T out,
std::string const &  label 
) const
private

◆ printEventHeader() [2/2]

template<typename T >
void FastTimerService::printEventHeader ( T out,
std::string const &  label 
) const

Definition at line 1143 of file FastTimerService.cc.

References label, and MillePedeFileConverter_cfg::out.

1143  {
1144  out << "FastReport CPU time Real time Allocated Deallocated " << label << "\n";
1145  // FastReport ########.# ms ########.# ms +######### kB -######### kB ...
1146 }
char const * label

◆ printEventLine() [1/4]

template<typename T >
void FastTimerService::printEventLine ( T out,
Resources const &  data,
std::string const &  label 
) const
private

◆ printEventLine() [2/4]

template<typename T >
void FastTimerService::printEventLine ( T out,
AtomicResources const &  data,
std::string const &  label 
) const
private

◆ printEventLine() [3/4]

template<typename T >
void FastTimerService::printEventLine ( T out,
Resources const &  data,
std::string const &  label 
) const

Definition at line 1149 of file FastTimerService.cc.

References data, label, and MillePedeFileConverter_cfg::out.

1149  {
1150  out << fmt::sprintf("FastReport %10.1f ms %10.1f ms %+10d kB %+10d kB %s\n",
1151  ms(data.time_thread),
1152  ms(data.time_real),
1153  +static_cast<int64_t>(kB(data.allocated)),
1154  -static_cast<int64_t>(kB(data.deallocated)),
1155  label);
1156 }
char const * label
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79

◆ printEventLine() [4/4]

template<typename T >
void FastTimerService::printEventLine ( T out,
AtomicResources const &  data,
std::string const &  label 
) const

Definition at line 1159 of file FastTimerService.cc.

References data, label, and MillePedeFileConverter_cfg::out.

1159  {
1160  out << fmt::sprintf("FastReport %10.1f ms %10.1f ms %+10d kB %+10d kB %s\n",
1161  ms(boost::chrono::nanoseconds(data.time_thread.load())),
1162  ms(boost::chrono::nanoseconds(data.time_real.load())),
1163  +static_cast<int64_t>(kB(data.allocated)),
1164  -static_cast<int64_t>(kB(data.deallocated)),
1165  label);
1166 }
boost::date_time::subsecond_duration< boost::posix_time::time_duration, 1000000000 > nanoseconds
char const * label
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79

◆ printHeader() [1/2]

template<typename T >
void FastTimerService::printHeader ( T out,
std::string const &  label 
) const
private

◆ printHeader() [2/2]

template<typename T >
void FastTimerService::printHeader ( T out,
std::string const &  label 
) const

Definition at line 1130 of file FastTimerService.cc.

References mps_fire::i, label, and MillePedeFileConverter_cfg::out.

1130  {
1131  out << "FastReport ";
1132  if (label.size() < 60)
1133  for (unsigned int i = (60 - label.size()) / 2; i > 0; --i)
1134  out << '-';
1135  out << ' ' << label << " Summary ";
1136  if (label.size() < 60)
1137  for (unsigned int i = (59 - label.size()) / 2; i > 0; --i)
1138  out << '-';
1139  out << '\n';
1140 }
char const * label

◆ printPathSummaryHeader() [1/2]

template<typename T >
void FastTimerService::printPathSummaryHeader ( T out,
std::string const &  label 
) const
private

◆ printPathSummaryHeader() [2/2]

template<typename T >
void FastTimerService::printPathSummaryHeader ( T out,
std::string const &  label 
) const

Definition at line 1234 of file FastTimerService.cc.

References label, and MillePedeFileConverter_cfg::out.

1234  {
1235  // clang-format off
1236  out << "FastReport CPU time sched. / depend. Real time sched. / depend. Alloc. sched. / depend. Dealloc. sched. / depend. ";
1237  // FastReport ########.# ms ########.# ms ########.# ms ########.# ms +######### kB +######### kB -######### kB -######### kB ...
1238  out << label << '\n';
1239  // clang-format on
1240 }
char const * label

◆ printPathSummaryLine() [1/2]

template<typename T >
void FastTimerService::printPathSummaryLine ( T out,
Resources const &  data,
Resources const &  total,
uint64_t  events,
std::string const &  label 
) const
private

◆ printPathSummaryLine() [2/2]

template<typename T >
void FastTimerService::printPathSummaryLine ( T out,
Resources const &  data,
Resources const &  total,
uint64_t  events,
std::string const &  label 
) const

Definition at line 1306 of file FastTimerService.cc.

References data, events, label, MillePedeFileConverter_cfg::out, and dqmMemoryStats::total.

1307  {
1308  out << fmt::sprintf(
1309  "FastReport %10.1f ms %10.1f ms %10.1f ms %10.1f ms %+10d kB %+10d kB %+10d kB %+10d kB %s\n",
1310  (events ? ms(data.time_thread) / events : 0),
1311  (events ? ms(total.time_thread) / events : 0),
1312  (events ? ms(data.time_real) / events : 0),
1313  (events ? ms(total.time_real) / events : 0),
1314  (events ? +static_cast<int64_t>(kB(data.allocated) / events) : 0),
1315  (events ? +static_cast<int64_t>(kB(total.allocated) / events) : 0),
1316  (events ? -static_cast<int64_t>(kB(data.deallocated) / events) : 0),
1317  (events ? -static_cast<int64_t>(kB(total.deallocated) / events) : 0),
1318  label);
1319 }
char const * label
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
int events

◆ printSummary() [1/2]

template<typename T >
void FastTimerService::printSummary ( T out,
ResourcesPerJob const &  data,
std::string const &  label 
) const
private

◆ printSummary() [2/2]

template<typename T >
void FastTimerService::printSummary ( T out,
ResourcesPerJob const &  data,
std::string const &  label 
) const

Definition at line 1322 of file FastTimerService.cc.

References data, watchdog::group, mps_fire::i, label, visualization-live-secondInstance_cfg::m, callgraph::module, Skims_PA_cff::name, MillePedeFileConverter_cfg::out, AlCaHLTBitMon_ParallelJobs::p, castor_dqm_sourceclient_file_cfg::path, ValidateTausOnZEEFastSim_cff::proc, and source.

1322  {
1323  printHeader(out, label);
1324  printSummaryHeader(out, "Modules", true);
1325  auto const& source_d = callgraph_.source();
1326  auto const& source = data.modules[source_d.id()];
1327  printSummaryLine(out, source.total, data.events, source.events, source_d.moduleLabel());
1328  for (unsigned int i = 0; i < callgraph_.processes().size(); ++i) {
1329  auto const& proc_d = callgraph_.processDescription(i);
1330  auto const& proc = data.processes[i];
1331  printSummaryLine(out, proc.total, data.events, "process " + proc_d.name_);
1332  for (unsigned int m : proc_d.modules_) {
1333  auto const& module_d = callgraph_.module(m);
1334  auto const& module = data.modules[m];
1335  printSummaryLine(out, module.total, data.events, module.events, " " + module_d.moduleLabel());
1336  }
1337  }
1338  printSummaryLine(out, data.total, data.events, "total");
1339  printSummaryLine(out, data.overhead, data.events, "other");
1340  printSummaryLine(out, data.eventsetup, data.events, "eventsetup");
1341  out << '\n';
1342  printPathSummaryHeader(out, "Processes and Paths");
1343  printSummaryLine(out, source.total, data.events, source_d.moduleLabel());
1344  for (unsigned int i = 0; i < callgraph_.processes().size(); ++i) {
1345  auto const& proc_d = callgraph_.processDescription(i);
1346  auto const& proc = data.processes[i];
1347  printSummaryLine(out, proc.total, data.events, "process " + proc_d.name_);
1348  for (unsigned int p = 0; p < proc.paths.size(); ++p) {
1349  auto const& name = proc_d.paths_[p].name_;
1350  auto const& path = proc.paths[p];
1351  printPathSummaryLine(out, path.active, path.total, data.events, " " + name);
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  printPathSummaryLine(out, path.active, path.total, data.events, " " + name);
1357  }
1358  }
1359  printSummaryLine(out, data.total, data.events, "total");
1360  printSummaryLine(out, data.overhead, data.events, "other");
1361  printSummaryLine(out, data.eventsetup, data.events, "eventsetup");
1362  out << '\n';
1363  for (unsigned int group : boost::irange(0ul, highlight_modules_.size())) {
1364  printSummaryHeader(out, "Highlighted modules", true);
1365  for (unsigned int m : highlight_modules_[group].modules) {
1366  auto const& module_d = callgraph_.module(m);
1367  auto const& module = data.modules[m];
1368  printSummaryLine(out, module.total, data.events, module.events, module_d.moduleLabel());
1369  }
1370  printSummaryLine(out, data.highlight[group], data.events, highlight_modules_[group].label);
1371  out << '\n';
1372  }
1373 }
std::vector< GroupOfModules > highlight_modules_
edm::ModuleDescription const & source() const
edm::ModuleDescription const & module(unsigned int module) const
char const * label
std::vector< ProcessType > const & processes() const
void printSummaryLine(T &out, Resources const &data, uint64_t events, std::string const &label) const
void printPathSummaryLine(T &out, Resources const &data, Resources const &total, uint64_t events, std::string const &label) const
void printSummaryHeader(T &out, std::string const &label, bool detailed) const
void printPathSummaryHeader(T &out, std::string const &label) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
void printHeader(T &out, std::string const &label) const
ProcessType const & processDescription(unsigned int) const
ProcessCallGraph callgraph_
static std::string const source
Definition: EdmProvDump.cc:49

◆ printSummaryHeader() [1/2]

template<typename T >
void FastTimerService::printSummaryHeader ( T out,
std::string const &  label,
bool  detailed 
) const
private

◆ printSummaryHeader() [2/2]

template<typename T >
void FastTimerService::printSummaryHeader ( T out,
std::string const &  label,
bool  detailed 
) const

Definition at line 1221 of file FastTimerService.cc.

References label, and MillePedeFileConverter_cfg::out.

1221  {
1222  // clang-format off
1223  if (detailed)
1224  out << "FastReport CPU time avg. when run Real time avg. when run Alloc. avg. when run Dealloc. avg. when run ";
1225  // FastReport ########.# ms ########.# ms ########.# ms ########.# ms +######### kB +######### kB -######### kB -######### kB ...
1226  else
1227  out << "FastReport CPU time avg. Real time avg. Alloc. avg. Dealloc. avg. ";
1228  // FastReport ########.# ms ########.# ms +######### kB -######### kB ...
1229  out << label << '\n';
1230  // clang-format on
1231 }
char const * label

◆ printSummaryLine() [1/8]

template<typename T >
void FastTimerService::printSummaryLine ( T out,
Resources const &  data,
uint64_t  events,
std::string const &  label 
) const
private

◆ printSummaryLine() [2/8]

template<typename T >
void FastTimerService::printSummaryLine ( T out,
Resources const &  data,
uint64_t  events,
uint64_t  active,
std::string const &  label 
) const
private

◆ printSummaryLine() [3/8]

template<typename T >
void FastTimerService::printSummaryLine ( T out,
AtomicResources const &  data,
uint64_t  events,
std::string const &  label 
) const
private

◆ printSummaryLine() [4/8]

template<typename T >
void FastTimerService::printSummaryLine ( T out,
AtomicResources const &  data,
uint64_t  events,
uint64_t  active,
std::string const &  label 
) const
private

◆ printSummaryLine() [5/8]

template<typename T >
void FastTimerService::printSummaryLine ( T out,
Resources const &  data,
uint64_t  events,
std::string const &  label 
) const

Definition at line 1243 of file FastTimerService.cc.

References data, events, label, and MillePedeFileConverter_cfg::out.

1243  {
1244  out << fmt::sprintf(
1245  // clang-format off
1246  "FastReport %10.1f ms %10.1f ms %+10d kB %+10d kB %s\n",
1247  // clang-format on
1248  (events ? ms(data.time_thread) / events : 0),
1249  (events ? ms(data.time_real) / events : 0),
1250  (events ? +static_cast<int64_t>(kB(data.allocated) / events) : 0),
1251  (events ? -static_cast<int64_t>(kB(data.deallocated) / events) : 0),
1252  label);
1253 }
char const * label
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
int events

◆ printSummaryLine() [6/8]

template<typename T >
void FastTimerService::printSummaryLine ( T out,
AtomicResources const &  data,
uint64_t  events,
uint64_t  active,
std::string const &  label 
) const

Definition at line 1256 of file FastTimerService.cc.

References data, events, label, and MillePedeFileConverter_cfg::out.

1257  {
1258  out << fmt::sprintf(
1259  // clang-format off
1260  "FastReport %10.1f ms %10.1f ms %10.1f ms %10.1f ms %+10d kB %+10d kB %+10d kB %+10d kB %s\n",
1261  // clang-format on
1262  (events ? ms(data.time_thread) / events : 0),
1263  (active ? ms(data.time_thread) / active : 0),
1264  (events ? ms(data.time_real) / events : 0),
1265  (active ? ms(data.time_real) / active : 0),
1266  (events ? +static_cast<int64_t>(kB(data.allocated) / events) : 0),
1267  (active ? +static_cast<int64_t>(kB(data.allocated) / active) : 0),
1268  (events ? -static_cast<int64_t>(kB(data.deallocated) / events) : 0),
1269  (active ? -static_cast<int64_t>(kB(data.deallocated) / active) : 0),
1270  label);
1271 }
char const * label
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
int events

◆ printSummaryLine() [7/8]

template<typename T >
void FastTimerService::printSummaryLine ( T out,
AtomicResources const &  data,
uint64_t  events,
std::string const &  label 
) const

Definition at line 1274 of file FastTimerService.cc.

References data, events, label, and MillePedeFileConverter_cfg::out.

1277  {
1278  out << fmt::sprintf(
1279  // clang-format off
1280  "FastReport %10.1f ms %10.1f ms %+10d kB %+10d kB %s\n",
1281  // clang-format on
1282  (events ? ms(data.time_thread) / events : 0),
1283  (events ? ms(data.time_real) / events : 0),
1284  (events ? +static_cast<int64_t>(kB(data.allocated) / events) : 0),
1285  (events ? -static_cast<int64_t>(kB(data.deallocated) / events) : 0),
1286  label);
1287 }
char const * label
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
int events

◆ printSummaryLine() [8/8]

template<typename T >
void FastTimerService::printSummaryLine ( T out,
Resources const &  data,
uint64_t  events,
uint64_t  active,
std::string const &  label 
) const

Definition at line 1290 of file FastTimerService.cc.

References data, events, label, and MillePedeFileConverter_cfg::out.

1291  {
1292  out << fmt::sprintf(
1293  "FastReport %10.1f ms %10.1f ms %10.1f ms %10.1f ms %+10d kB %+10d kB %+10d kB %+10d kB %s\n",
1294  (events ? ms(data.time_thread) / events : 0),
1295  (active ? ms(data.time_thread) / active : 0),
1296  (events ? ms(data.time_real) / events : 0),
1297  (active ? ms(data.time_real) / active : 0),
1298  (events ? +static_cast<int64_t>(kB(data.allocated) / events) : 0),
1299  (active ? +static_cast<int64_t>(kB(data.allocated) / active) : 0),
1300  (events ? -static_cast<int64_t>(kB(data.deallocated) / events) : 0),
1301  (active ? -static_cast<int64_t>(kB(data.deallocated) / active) : 0),
1302  label);
1303 }
char const * label
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
int events

◆ printTransition() [1/2]

template<typename T >
void FastTimerService::printTransition ( T out,
AtomicResources const &  data,
std::string const &  label 
) const
private

◆ printTransition() [2/2]

template<typename T >
void FastTimerService::printTransition ( T out,
AtomicResources const &  data,
std::string const &  label 
) const

Definition at line 1376 of file FastTimerService.cc.

References data, label, and MillePedeFileConverter_cfg::out.

1376  {
1377  printEventHeader(out, "Transition");
1379 }
char const * label
void printEventHeader(T &out, std::string const &label) const
void printEventLine(T &out, Resources const &data, std::string const &label) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79

◆ thread()

FastTimerService::Measurement & FastTimerService::thread ( )
private

Definition at line 1777 of file FastTimerService.cc.

References guard_, and FastTimerService::ThreadGuard::thread().

Referenced by on_scheduler_entry().

1777 { return guard_.thread(); }

◆ unsupportedSignal()

void FastTimerService::unsupportedSignal ( const std::string &  signal) const
private

Definition at line 899 of file FastTimerService.cc.

899  {
900  // warn about each signal only once per job
901  if (unsupported_signals_.insert(signal).second)
902  edm::LogWarning("FastTimerService") << "The FastTimerService received the unsupported signal \"" << signal
903  << "\".\n"
904  << "Please report how to reproduce the issue to cms-hlt@cern.ch .";
905 }
tbb::concurrent_unordered_set< std::string > unsupported_signals_

◆ writeSummaryJSON()

void FastTimerService::writeSummaryJSON ( ResourcesPerJob const &  data,
std::string const &  filename 
) const
private

Definition at line 1399 of file FastTimerService.cc.

References mps_check::array, data, corrVsCorr::filename, mps_fire::i, dqmiolumiharvest::j, callgraph::module, and MillePedeFileConverter_cfg::out.

1399  {
1400  json j;
1401 
1402  // write a description of the resources
1403  j["resources"] = json::array({json{{"time_real", "real time"}},
1404  json{{"time_thread", "cpu time"}},
1405  json{{"mem_alloc", "allocated memory"}},
1406  json{{"mem_free", "deallocated memory"}}});
1407 
1408  // write the resources used by the job
1409  j["total"] = encodeToJSON(
1410  "Job", callgraph_.processDescription(0).name_, data.events, data.total + data.overhead + data.eventsetup);
1411 
1412  // write the resources used by every module
1413  j["modules"] = json::array();
1414  for (unsigned int i = 0; i < callgraph_.size(); ++i) {
1415  auto const& module = callgraph_.module(i);
1416  auto const& data_m = data.modules[i];
1417  j["modules"].push_back(encodeToJSON(module, data_m));
1418  }
1419 
1420  // add an entry for the "overhead"
1421  j["modules"].push_back(encodeToJSON("other", "other", data.events, data.overhead));
1422  j["modules"].push_back(encodeToJSON("eventsetup", "eventsetup", data.events, data.eventsetup));
1423 
1424  std::ofstream out(filename);
1425  out << std::setw(2) << j << std::flush;
1426 }
nlohmann::json json
edm::ModuleDescription const & module(unsigned int module) const
json encodeToJSON(std::string const &type, std::string const &label, unsigned int events, T const &data) const
unsigned int size() const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
ProcessType const & processDescription(unsigned int) const
ProcessCallGraph callgraph_

Member Data Documentation

◆ callgraph_

ProcessCallGraph FastTimerService::callgraph_
private

Definition at line 447 of file FastTimerService.h.

◆ concurrent_lumis_

unsigned int FastTimerService::concurrent_lumis_
private

Definition at line 502 of file FastTimerService.h.

◆ concurrent_runs_

unsigned int FastTimerService::concurrent_runs_
private

Definition at line 503 of file FastTimerService.h.

◆ concurrent_streams_

unsigned int FastTimerService::concurrent_streams_
private

Definition at line 504 of file FastTimerService.h.

◆ concurrent_threads_

unsigned int FastTimerService::concurrent_threads_
private

Definition at line 505 of file FastTimerService.h.

◆ dqm_event_ranges_

const PlotRanges FastTimerService::dqm_event_ranges_
private

Definition at line 527 of file FastTimerService.h.

◆ dqm_lumisections_range_

const unsigned int FastTimerService::dqm_lumisections_range_
private

Definition at line 530 of file FastTimerService.h.

◆ dqm_module_ranges_

const PlotRanges FastTimerService::dqm_module_ranges_
private

Definition at line 529 of file FastTimerService.h.

◆ dqm_path_

std::string FastTimerService::dqm_path_
private

Definition at line 531 of file FastTimerService.h.

◆ dqm_path_ranges_

const PlotRanges FastTimerService::dqm_path_ranges_
private

Definition at line 528 of file FastTimerService.h.

◆ enable_dqm_

bool FastTimerService::enable_dqm_
private

Definition at line 520 of file FastTimerService.h.

◆ enable_dqm_byls_

const bool FastTimerService::enable_dqm_byls_
private

Definition at line 523 of file FastTimerService.h.

◆ enable_dqm_bymodule_

const bool FastTimerService::enable_dqm_bymodule_
private

Definition at line 521 of file FastTimerService.h.

◆ enable_dqm_bynproc_

const bool FastTimerService::enable_dqm_bynproc_
private

Definition at line 524 of file FastTimerService.h.

◆ enable_dqm_bypath_

const bool FastTimerService::enable_dqm_bypath_
private

Definition at line 522 of file FastTimerService.h.

◆ enable_dqm_transitions_

const bool FastTimerService::enable_dqm_transitions_
private

Definition at line 525 of file FastTimerService.h.

◆ guard_

ThreadGuard FastTimerService::guard_
private

Definition at line 491 of file FastTimerService.h.

Referenced by on_scheduler_entry(), and thread().

◆ highlight_module_psets_

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

Definition at line 533 of file FastTimerService.h.

◆ highlight_modules_

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

Definition at line 534 of file FastTimerService.h.

◆ job_summary_

ResourcesPerJob FastTimerService::job_summary_
private

Definition at line 461 of file FastTimerService.h.

◆ json_filename_

const std::string FastTimerService::json_filename_
private

Definition at line 517 of file FastTimerService.h.

◆ lumi_transition_

std::vector<AtomicResources> FastTimerService::lumi_transition_
private

Definition at line 456 of file FastTimerService.h.

◆ overhead_

AtomicResources FastTimerService::overhead_
private

◆ plots_

std::unique_ptr<PlotsPerJob> FastTimerService::plots_
private

Definition at line 453 of file FastTimerService.h.

◆ print_event_summary_

const bool FastTimerService::print_event_summary_
private

Definition at line 508 of file FastTimerService.h.

◆ print_job_summary_

const bool FastTimerService::print_job_summary_
private

Definition at line 510 of file FastTimerService.h.

◆ print_run_summary_

const bool FastTimerService::print_run_summary_
private

Definition at line 509 of file FastTimerService.h.

◆ run_summary_

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

Definition at line 462 of file FastTimerService.h.

◆ run_transition_

std::vector<AtomicResources> FastTimerService::run_transition_
private

Definition at line 457 of file FastTimerService.h.

◆ streams_

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

Definition at line 450 of file FastTimerService.h.

◆ subprocess_event_check_

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

Definition at line 494 of file FastTimerService.h.

◆ subprocess_global_lumi_check_

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

Definition at line 495 of file FastTimerService.h.

◆ subprocess_global_run_check_

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

Definition at line 496 of file FastTimerService.h.

◆ summary_mutex_

std::mutex FastTimerService::summary_mutex_
private

Definition at line 463 of file FastTimerService.h.

◆ unsupported_signals_

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

Definition at line 537 of file FastTimerService.h.

◆ write_json_summary_

const bool FastTimerService::write_json_summary_
private

Definition at line 516 of file FastTimerService.h.