|
|
Go to the documentation of this file. 1 #ifndef FastTimerService_h
2 #define FastTimerService_h
13 #include <unordered_map>
16 #include <boost/chrono.hpp>
19 #include <tbb/concurrent_unordered_set.h>
20 #include <tbb/enumerable_thread_specific.h>
21 #include <tbb/task_scheduler_observer.h>
24 #include <nlohmann/json_fwd.hpp>
200 #ifdef DEBUG_THREAD_CONCURRENCY
202 #endif // DEBUG_THREAD_CONCURRENCY
204 boost::chrono::high_resolution_clock::time_point
time_real;
260 void reset() noexcept;
293 std::vector<ResourcesPerPath>
paths;
332 unsigned int lumisections,
359 unsigned int lumisections,
364 unsigned int lumisection);
392 unsigned int lumisections,
410 std::vector<GroupOfModules>
const&,
414 unsigned int lumisections,
459 tbb::enumerable_thread_specific<Measurement, tbb::cache_aligned_allocator<Measurement>, tbb::ets_key_per_instance>
509 template <
typename T>
512 template <
typename T>
515 template <
typename T>
518 template <
typename T>
521 template <
typename T>
524 template <
typename T>
527 template <
typename T>
530 template <
typename T>
533 template <
typename T>
536 template <
typename T>
539 template <
typename T>
543 template <
typename T>
547 template <
typename T>
550 template <
typename T>
553 template <
typename T>
568 #endif // ! FastTimerService_h
Measurement event_measurement
const bool enable_dqm_bynproc_
void preSourceEvent(edm::StreamID)
const std::string json_filename_
std::vector< Resources > highlight
std::atomic< boost::chrono::nanoseconds::rep > time_thread
unsigned int concurrent_threads_
void postStreamBeginLumi(edm::StreamContext const &)
std::vector< unsigned int > modules
void postSourceEvent(edm::StreamID)
std::vector< PlotsPerElement > modules_
ResourcesPerJob & operator+=(ResourcesPerJob const &other)
void preBeginJob(edm::PathsAndConsumesOfModulesBase const &, edm::ProcessContext const &)
ResourcesPerModule operator+(ResourcesPerModule const &other) const
void printEvent(T &out, ResourcesPerJob const &) const
void preModuleStreamBeginLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
ProcessCallGraph callgraph_
std::vector< ResourcesPerJob > streams_
void preModuleGlobalBeginRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
unsigned int concurrent_streams_
ResourcesPerJob()=default
void preSourceLumi(edm::LuminosityBlockIndex)
std::vector< edm::ParameterSet > highlight_module_psets_
std::vector< ResourcesPerModule > modules
PlotsPerProcess(ProcessCallGraph::ProcessType const &)
std::vector< ResourcesPerPath > endpaths
std::vector< ResourcesPerPath > paths
boost::date_time::subsecond_duration< boost::posix_time::time_duration, 1000000000 > nanoseconds
std::atomic< uint64_t > deallocated
void postEvent(edm::StreamContext const &)
void postModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
const bool print_job_summary_
void preSourceConstruction(edm::ModuleDescription const &)
void fill_run(AtomicResources const &)
void preGlobalBeginLumi(edm::GlobalContext const &)
FastTimerService(const edm::ParameterSet &, edm::ActivityRegistry &)
AtomicResources overhead_
unsigned int concurrent_runs_
const bool enable_dqm_bypath_
std::vector< ResourcesPerJob > run_summary_
void on_scheduler_exit(bool worker) final
void postModuleStreamEndRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
const bool enable_dqm_transitions_
void writeSummaryJSON(ResourcesPerJob const &data, std::string const &filename) const
const PlotRanges dqm_module_ranges_
ResourcesPerJob job_summary_
dqm::reco::MonitorElement * time_thread_byls_
unsigned int concurrent_lumis_
const PlotRanges dqm_event_ranges_
void preGlobalBeginRun(edm::GlobalContext const &)
bool isLastSubprocess(std::atomic< unsigned int > &check)
std::atomic< boost::chrono::nanoseconds::rep > time_real
dqm::reco::MonitorElement * time_thread_
void postSourceLumi(edm::LuminosityBlockIndex)
void preModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
void unsupportedSignal(const std::string &signal) const
void preModuleEventAcquire(edm::StreamContext const &, edm::ModuleCallingContext const &)
json encodeToJSON(std::string const &type, std::string const &label, unsigned int events, T const &data) const
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_global_run_check_
std::atomic< uint64_t > allocated
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_global_lumi_check_
void printTransition(T &out, AtomicResources const &data, std::string const &label) const
ResourcesPerModule() noexcept
void book(dqm::reco::DQMStore::IBooker &, ProcessCallGraph const &, ProcessCallGraph::ProcessType const &, PlotRanges const &event_ranges, PlotRanges const &path_ranges, unsigned int lumisections, bool bypath, bool byls)
void preallocate(edm::service::SystemBounds const &)
void preGlobalEndRun(edm::GlobalContext const &)
void fill(ProcessCallGraph::PathType const &, ResourcesPerJob const &, ResourcesPerPath const &, unsigned int lumisection)
void on_scheduler_entry(bool worker) final
boost::chrono::nanoseconds time_thread
void printSummaryHeader(T &out, std::string const &label, bool detailed) const
const bool print_run_summary_
void postGlobalBeginLumi(edm::GlobalContext const &)
void postModuleGlobalBeginRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void ignoredSignal(const std::string &signal) const
std::vector< GroupOfModules > highlight_modules_
ResourcesPerModule & operator+=(ResourcesPerModule const &other)
void postGlobalEndRun(edm::GlobalContext const &)
const PlotRanges dqm_path_ranges_
ResourcesPerProcess & operator+=(ResourcesPerProcess const &other)
std::vector< AtomicResources > lumi_transition_
void postModuleGlobalEndLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
boost::chrono::nanoseconds time_real
void postModuleStreamEndLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
void preModuleEventPrefetching(edm::StreamContext const &, edm::ModuleCallingContext const &)
PlotsPerElement event_ex_
void preStreamBeginLumi(edm::StreamContext const &)
void postModuleGlobalEndRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
const bool enable_dqm_byls_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void preModuleGlobalBeginLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void preStreamBeginRun(edm::StreamContext const &)
void postModuleStreamBeginRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
bool isFirstSubprocess(edm::StreamContext const &)
void preModuleStreamEndRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
void fill_fraction(Resources const &, Resources const &, unsigned int lumisection)
std::unique_ptr< PlotsPerJob > plots_
void printSummaryLine(T &out, Resources const &data, uint64_t events, std::string const &label) const
PlotsPerElement()=default
static boost::mutex mutex
void fill(ProcessCallGraph::ProcessType const &, ResourcesPerJob const &, ResourcesPerProcess const &, unsigned int ls)
AtomicResources operator+(AtomicResources const &other) const
void printEventHeader(T &out, std::string const &label) const
Resources operator+(Resources const &other) const
dqm::reco::MonitorElement * module_deallocated_total_
std::vector< ResourcesPerProcess > processes
tbb::concurrent_unordered_set< std::string > unsupported_signals_
tbb::enumerable_thread_specific< Measurement, tbb::cache_aligned_allocator< Measurement >, tbb::ets_key_per_instance > threads_
dqm::reco::MonitorElement * module_allocated_total_
dqm::reco::MonitorElement * time_real_
dqm::reco::MonitorElement * deallocated_
~FastTimerService() override=default
void preModuleStreamEndLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
ResourcesPerPath operator+(ResourcesPerPath const &other) const
PlotsPerElement overhead_
std::vector< PlotsPerProcess > processes_
void postModuleEventAcquire(edm::StreamContext const &, edm::ModuleCallingContext const &)
std::mutex summary_mutex_
const bool write_json_summary_
void preModuleGlobalEndRun(edm::GlobalContext const &, edm::ModuleCallingContext const &)
void postModuleEventPrefetching(edm::StreamContext const &, edm::ModuleCallingContext const &)
void book(dqm::reco::DQMStore::IBooker &, std::string const &name, std::string const &title, PlotRanges const &ranges, unsigned int lumisections, bool byls)
std::vector< PlotsPerPath > endpaths_
const unsigned int dqm_lumisections_range_
void postModuleStreamBeginLumi(edm::StreamContext const &, edm::ModuleCallingContext const &)
void measure_and_store(Resources &store) noexcept
ResourcesPerJob operator+(ResourcesPerJob const &other) const
dqm::reco::MonitorElement * allocated_
dqm::reco::MonitorElement * time_real_byls_
void measure_and_accumulate(Resources &store) noexcept
void preStreamEndRun(edm::StreamContext const &)
void preModuleGlobalEndLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
PlotsPerJob(ProcessCallGraph const &job, std::vector< GroupOfModules > const &groups)
void fill(ProcessCallGraph const &, ResourcesPerJob const &, unsigned int ls)
void postModuleGlobalBeginLumi(edm::GlobalContext const &, edm::ModuleCallingContext const &)
boost::chrono::high_resolution_clock::time_point time_real
void book(dqm::reco::DQMStore::IBooker &, std::string const &, ProcessCallGraph const &, ProcessCallGraph::PathType const &, PlotRanges const &ranges, unsigned int lumisections, bool byls)
void postStreamEndLumi(edm::StreamContext const &)
void printPathSummaryLine(T &out, Resources const &data, Resources const &total, uint64_t events, std::string const &label) const
ResourcesPerProcess(ProcessCallGraph::ProcessType const &process)
std::unique_ptr< std::atomic< unsigned int >[]> subprocess_event_check_
void preEventReadFromSource(edm::StreamContext const &, edm::ModuleCallingContext const &)
Resources & operator+=(Resources const &other)
void preModuleStreamBeginRun(edm::StreamContext const &, edm::ModuleCallingContext const &)
dqm::reco::MonitorElement * module_time_real_total_
dqm::reco::MonitorElement * module_time_thread_total_
void fill_lumi(AtomicResources const &, unsigned int lumisection)
dqm::reco::MonitorElement * module_counter_
AtomicResources & operator=(AtomicResources const &other)
void prePathEvent(edm::StreamContext const &, edm::PathContext const &)
void postPathEvent(edm::StreamContext const &, edm::PathContext const &, edm::HLTPathStatus const &)
void postGlobalEndLumi(edm::GlobalContext const &)
AtomicResources & operator+=(AtomicResources const &other)
void book(dqm::reco::DQMStore::IBooker &, ProcessCallGraph const &, std::vector< GroupOfModules > const &, PlotRanges const &event_ranges, PlotRanges const &path_ranges, PlotRanges const &module_ranges, unsigned int lumisections, bool bymodule, bool bypath, bool byls, bool transitions)
void preModuleEventDelayedGet(edm::StreamContext const &, edm::ModuleCallingContext const &)
void preStreamEndLumi(edm::StreamContext const &)
void preGlobalEndLumi(edm::GlobalContext const &)
dqm::reco::MonitorElement * allocated_byls_
void postModuleEventDelayedGet(edm::StreamContext const &, edm::ModuleCallingContext const &)
void postStreamBeginRun(edm::StreamContext const &)
char data[epos_bytes_allocation]
void printHeader(T &out, std::string const &label) const
unsigned long long uint64_t
void fill(Resources const &, unsigned int lumisection)
ResourcesPerProcess operator+(ResourcesPerProcess const &other) const
void printSummary(T &out, ResourcesPerJob const &data, std::string const &label) const
void postGlobalBeginRun(edm::GlobalContext const &)
void postSourceRun(edm::RunIndex)
std::vector< PlotsPerPath > paths_
void printEventLine(T &out, Resources const &data, std::string const &label) const
dqm::reco::MonitorElement * deallocated_byls_
std::vector< AtomicResources > run_transition_
std::vector< PlotsPerElement > highlight_
void preSourceRun(edm::RunIndex)
const bool print_event_summary_
const bool enable_dqm_bymodule_
void postStreamEndRun(edm::StreamContext const &)
void preEvent(edm::StreamContext const &)
void postEventReadFromSource(edm::StreamContext const &, edm::ModuleCallingContext const &)
void printPathSummaryHeader(T &out, std::string const &label) const
boost::chrono::thread_clock::time_point time_thread
ResourcesPerPath & operator+=(ResourcesPerPath const &other)