1 #ifndef FastTimerService_h
2 #define FastTimerService_h
8 #include <unordered_map>
171 resolution(_resolution)
179 resolution(_resolution)
323 template <
typename T>
324 using PathMap = std::vector<std::unordered_map<std::string, T>>;
327 template <
typename T>
401 event += other.
event;
445 event += other.
event;
489 event ->Fill( 1000. * value.
event );
522 event ->Fill( 1000. * value.
event );
556 event ->Fill( x, 1000. * value.
event );
592 event ->Fill( x, 1000. * value.
event );
658 std::unordered_map<std::string, ModuleInfo>
modules;
716 perprocess_plots.reset();
718 for (
auto &
plots: process_plots)
727 for (
auto & keyval:
map)
728 keyval.second.
reset();
730 keyval.second.reset();
732 keyval.second.reset();
754 double delta(FastTimer::Clock::time_point
const &
first, FastTimer::Clock::time_point
const &
second)
756 return std::chrono::duration_cast<std::chrono::duration<double>>(second -
first).
count();
772 #endif // ! FastTimerService_h
void preGlobalBeginRun(edm::GlobalContext const &)
void preModuleEventDelayedGet(edm::StreamContext const &, edm::ModuleCallingContext const &)
FastTimer::Clock::time_point timer_last_path
PathMap< PathInfo > paths
void postStreamBeginRun(edm::StreamContext const &)
double queryEventTime(edm::StreamID) const
const double m_dqm_eventtime_resolution
~SummaryProfilesPerProcess()
std::vector< std::unordered_map< std::string, T >> PathMap
void postStreamEndLumi(edm::StreamContext const &)
LuminosityDescription(std::string &&_name, std::string &&_title, std::string const &_label, double _range, double _resolution)
static double delta(FastTimer::Clock::time_point const &first, FastTimer::Clock::time_point const &second)
bool m_enable_timing_modules
unsigned int m_concurrent_streams
void postModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
std::vector< TimingPerProcess > timing_perprocess
static boost::mutex mutex
LuminosityDescription(std::string const &_name, std::string const &_title, std::string const &_label, double _range, double _resolution)
FastTimer::Clock::time_point timer_last_transition
double summary_postmodules
const bool m_enable_dqm_bypath_counters
const bool m_skip_first_path
const bool m_enable_dqm_bypath_exclusive
void printSummary(Timing const &summary, std::string const &label) const
ModuleMap< ModuleInfo * > fast_moduletypes
std::vector< ProcessDescription > m_process
void fill(double x, TimingPerProcess const &value)
const double m_dqm_pathtime_range
double currentPathTime(edm::StreamID) const
std::vector< SummaryProfiles > dqm_byluminosity
std::vector< TimingPerProcess > m_job_summary_perprocess
void postPathEvent(edm::StreamContext const &, edm::PathContext const &, edm::HLTPathStatus const &)
unsigned int m_concurrent_threads
TProfile * exclusive_time
~PathProfilesPerProcess()
unsigned int m_concurrent_runs
void postStreamBeginLumi(edm::StreamContext const &)
ModuleInfo * current_module
U second(std::pair< T, U > const &p)
void preModuleBeginJob(edm::ModuleDescription const &)
std::vector< T > ModuleMap
const bool m_enable_dqm_bynproc
bool m_enable_timing_paths
Timing & operator+=(Timing const &other)
std::vector< LuminosityDescription > m_dqm_luminosity
void prePathEvent(edm::StreamContext const &, edm::PathContext const &)
const bool m_enable_dqm_byls
const double m_dqm_moduletime_resolution
std::mutex m_summary_mutex
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
FastTimerService(const edm::ParameterSet &, edm::ActivityRegistry &)
double queryModuleTimeByLabel(edm::StreamID, const std::string &) const
double currentEventTime(edm::StreamID) const
std::unordered_map< std::string, ModuleInfo > modules
void postEvent(edm::StreamContext const &)
void postGlobalEndRun(edm::GlobalContext const &)
void setLuminosity(unsigned int stream_id, unsigned int luminosity_id, double value)
std::vector< std::vector< TimingPerProcess > > m_run_summary_perprocess
void postStreamEndRun(edm::StreamContext const &)
void preModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
const bool m_enable_dqm_bypath_details
std::unordered_map< std::string, ModuleInfo > moduletypes
std::vector< double > luminosity
std::vector< Timing > m_run_summary
void fillPathMap(unsigned int pid, std::string const &name, std::vector< std::string > const &modules)
const bool m_enable_dqm_bypath_overhead
std::vector< SummaryPlotsPerProcess > dqm_perprocess
TimingPerProcess & operator+=(TimingPerProcess const &other)
ModuleMap< ModuleInfo * > fast_modules
const bool m_enable_dqm_bymodule
void postModuleEventDelayedGet(edm::StreamContext const &, edm::ModuleCallingContext const &)
const double m_dqm_moduletime_range
std::vector< std::vector< SummaryProfilesPerProcess > > dqm_perprocess_byluminosity
bool m_enable_timing_exclusive
double querySourceTime(edm::StreamID) const
Timing operator+(Timing const &other) const
void preSourceEvent(edm::StreamID)
void preEvent(edm::StreamContext const &)
const bool m_enable_timing_summary
void postSourceEvent(edm::StreamID)
const bool m_enable_dqm_bymoduletype
const bool m_enable_dqm_summary
double queryModuleTimeByType(edm::StreamID, const std::string &) const
double summary_premodules
std::string first_endpath
const bool m_enable_dqm_bypath_total
double queryModuleTime(edm::StreamID, const edm::ModuleDescription &) const
const bool m_enable_dqm_bypath_active
void fill(Timing const &value)
std::vector< ModuleInfo * > modules
double summary_intermodules
TH1F * dqm_module_counter
volatile std::atomic< bool > shutdown_flag false
std::vector< PathProfilesPerProcess > dqm_paths
static unsigned int processID(edm::ProcessContext const *)
double currentModuleTime(edm::StreamID) const
void fill(TimingPerProcess const &value)
void preStreamBeginRun(edm::StreamContext const &)
std::vector< StreamData > m_stream
std::vector< double > paths_interpaths
ModuleInfo * first_module
unsigned int reserveLuminosityPlots(std::string const &name, std::string const &title, std::string const &label, double range, double resolution)
SummaryProfilesPerProcess()
void printProcessSummary(Timing const &total, TimingPerProcess const &summary, std::string const &label, std::string const &process) const
void fill(double x, Timing const &value)
void preallocate(edm::service::SystemBounds const &)
const double m_dqm_eventtime_range
TimingPerProcess operator+(TimingPerProcess const &other) const
const double m_dqm_pathtime_resolution