|
|
|
void | accumulateTimeBegin (std::atomic< CountAndTime * > &countAndTime, double &accumulatedTime) |
|
void | accumulateTimeEnd (std::atomic< CountAndTime * > &countAndTime, double &accumulatedTime) |
|
void | lastPostEvent (double curr_event_time, unsigned int index, StreamContext const &iStream) |
|
void | postBeginJob () |
|
double | postCommon () const |
|
void | postEndJob () |
|
void | postEvent (StreamContext const &) |
|
void | postEventSetupGet (eventsetup::ComponentDescription const *, eventsetup::EventSetupRecordKey const &, eventsetup::DataKey const &) |
|
void | postGlobalBeginLumi (GlobalContext const &) |
|
void | postGlobalBeginRun (GlobalContext const &) |
|
void | postLockEventSetupGet (eventsetup::ComponentDescription const *, eventsetup::EventSetupRecordKey const &, eventsetup::DataKey const &) |
|
void | postModule (ModuleDescription const &md) |
|
void | postModuleEvent (StreamContext const &, ModuleCallingContext const &) |
|
void | postModuleGlobal (GlobalContext const &, ModuleCallingContext const &) |
|
void | postModuleStream (StreamContext const &, ModuleCallingContext const &) |
|
void | postOpenFile (std::string const &, bool) |
|
void | postSourceEvent (StreamID) |
|
void | postSourceLumi (LuminosityBlockIndex) |
|
void | postSourceRun (RunIndex) |
|
void | preBeginJob (PathsAndConsumesOfModulesBase const &, ProcessContext const &) |
|
void | preEvent (StreamContext const &) |
|
void | preLockEventSetupGet (eventsetup::ComponentDescription const *, eventsetup::EventSetupRecordKey const &, eventsetup::DataKey const &) |
|
void | preModule (ModuleDescription const &md) |
|
void | preModuleGlobal (GlobalContext const &, ModuleCallingContext const &) |
|
void | preModuleStream (StreamContext const &, ModuleCallingContext const &) |
|
void | preOpenFile (std::string const &, bool) |
|
void | preSourceEvent (StreamID) |
|
void | preSourceLumi (LuminosityBlockIndex) |
|
void | preSourceRun (RunIndex) |
|
Definition at line 46 of file Timing.cc.
◆ Timing()
Definition at line 219 of file Timing.cc.
226 summary_only_(iPS.getUntrackedParameter<
bool>(
"summaryOnly")),
228 threshold_(iPS.getUntrackedParameter<
double>(
"excessiveTimeThreshold")),
252 bool checkThreshold =
true;
256 checkThreshold =
false;
263 if (checkThreshold) {
315 iRegistry.preallocateSignal_.connect([
this](service::SystemBounds
const& iBounds) {
316 nStreams_ = iBounds.maxNumberOfStreams();
317 nThreads_ = iBounds.maxNumberOfThreads();
◆ ~Timing()
edm::service::Timing::~Timing |
( |
| ) |
|
|
override |
◆ accumulateTimeBegin()
void edm::service::Timing::accumulateTimeBegin |
( |
std::atomic< CountAndTime * > & |
countAndTime, |
|
|
double & |
accumulatedTime |
|
) |
| |
|
private |
◆ accumulateTimeEnd()
void edm::service::Timing::accumulateTimeEnd |
( |
std::atomic< CountAndTime * > & |
countAndTime, |
|
|
double & |
accumulatedTime |
|
) |
| |
|
private |
◆ addToCPUTime()
void edm::service::Timing::addToCPUTime |
( |
double |
iTime | ) |
|
|
overridevirtual |
◆ fillDescriptions()
◆ getTotalCPU()
double edm::service::Timing::getTotalCPU |
( |
| ) |
const |
|
overridevirtual |
◆ lastPostEvent()
void edm::service::Timing::lastPostEvent |
( |
double |
curr_event_time, |
|
|
unsigned int |
index, |
|
|
StreamContext const & |
iStream |
|
) |
| |
|
private |
◆ postBeginJob()
void edm::service::Timing::postBeginJob |
( |
| ) |
|
|
private |
◆ postCommon()
double edm::service::Timing::postCommon |
( |
| ) |
const |
|
private |
Definition at line 594 of file Timing.cc.
600 LogError(
"ExcessiveTime")
601 <<
"ExcessiveTime: Module used " <<
t
602 <<
" seconds of time which exceeds the error threshold configured in the Timing Service of " <<
threshold_
References configuredInTopLevelProcess_, edm::service::popStack(), OrderedSet::t, and threshold_.
Referenced by postModule(), postModuleEvent(), postModuleGlobal(), postModuleStream(), postOpenFile(), postSourceEvent(), postSourceLumi(), and postSourceRun().
◆ postEndJob()
void edm::service::Timing::postEndJob |
( |
| ) |
|
|
private |
Definition at line 383 of file Timing.cc.
385 LogImportant(
"TimeReport") <<
"\nTimeReport> This instance of the Timing Service will be disabled because it "
386 "is configured in a SubProcess.\n"
387 <<
"If multiple instances of the TimingService were configured only the one in the "
388 "top level process will function.\n"
389 <<
"The other instance(s) will simply print this message and do nothing.\n\n";
393 const double job_end_time =
getTime();
394 const double job_end_cpu =
getCPU();
415 total_loop_time = 0.0;
416 total_loop_cpu = 0.0;
419 double sum_all_events_time = 0;
421 sum_all_events_time +=
t;
424 double average_event_time = 0.0;
429 double event_throughput = 0.0;
430 if (total_loop_time != 0.0) {
434 LogImportant(
"TimeReport") <<
"TimeReport> Time report complete in " << total_job_time <<
" seconds"
436 <<
" Time Summary: \n"
437 <<
" - Min event: " << min_event_time <<
"\n"
438 <<
" - Max event: " << max_event_time <<
"\n"
439 <<
" - Avg event: " << average_event_time <<
"\n"
440 <<
" - Total loop: " << total_loop_time <<
"\n"
441 <<
" - Total init: " << total_initialization_time <<
"\n"
442 <<
" - Total job: " << total_job_time <<
"\n"
445 <<
" Event Throughput: " << event_throughput <<
" ev/s\n"
446 <<
" CPU Summary: \n"
447 <<
" - Total loop: " << total_loop_cpu <<
"\n"
448 <<
" - Total init: " << total_initialization_cpu <<
"\n"
450 <<
" - Total job: " << total_job_cpu <<
"\n"
451 <<
" Processing Summary: \n"
458 std::map<std::string, std::string> reportData;
460 reportData.insert(std::make_pair(
"MinEventTime",
d2str(min_event_time)));
461 reportData.insert(std::make_pair(
"MaxEventTime",
d2str(max_event_time)));
462 reportData.insert(std::make_pair(
"AvgEventTime",
d2str(average_event_time)));
463 reportData.insert(std::make_pair(
"EventThroughput",
d2str(event_throughput)));
464 reportData.insert(std::make_pair(
"TotalJobTime",
d2str(total_job_time)));
465 reportData.insert(std::make_pair(
"TotalJobCPU",
d2str(total_job_cpu)));
466 reportData.insert(std::make_pair(
"TotalLoopTime",
d2str(total_loop_time)));
467 reportData.insert(std::make_pair(
"TotalLoopCPU",
d2str(total_loop_cpu)));
468 reportData.insert(std::make_pair(
"TotalInitTime",
d2str(total_initialization_time)));
469 reportData.insert(std::make_pair(
"TotalInitCPU",
d2str(total_initialization_cpu)));
470 reportData.insert(std::make_pair(
"NumberOfStreams",
ui2str(
nStreams_)));
471 reportData.insert(std::make_pair(
"NumberOfThreads",
ui2str(
nThreads_)));
474 reportSvc->reportPerformanceSummary(
"Timing", reportData);
476 std::map<std::string, std::string> reportData1;
480 reportSvc->reportPerformanceSummary(
"ProcessingSummary", reportData1);
References accumulatedTimeForGet_, accumulatedTimeForLock_, begin_lumi_count_, begin_run_count_, configuredInTopLevelProcess_, curr_job_cpu_, curr_job_time_, edm::service::d2str(), extra_job_cpu_, edm::service::getCPU(), edm::service::getTime(), edm::TimingServiceBase::jobStartTime(), last_run_cpu_, last_run_time_, max_events_time_, min_events_time_, nStreams_, nThreads_, report_summary_, sum_events_time_, OrderedSet::t, total_event_count_, and edm::service::ui2str().
◆ postEvent()
void edm::service::Timing::postEvent |
( |
StreamContext const & |
iStream | ) |
|
|
private |
◆ postEventSetupGet()
◆ postGlobalBeginLumi()
void edm::service::Timing::postGlobalBeginLumi |
( |
GlobalContext const & |
gc | ) |
|
|
private |
◆ postGlobalBeginRun()
void edm::service::Timing::postGlobalBeginRun |
( |
GlobalContext const & |
gc | ) |
|
|
private |
◆ postLockEventSetupGet()
◆ postModule()
◆ postModuleEvent()
◆ postModuleGlobal()
◆ postModuleStream()
◆ postOpenFile()
void edm::service::Timing::postOpenFile |
( |
std::string const & |
lfn, |
|
|
bool |
b |
|
) |
| |
|
private |
◆ postSourceEvent()
void edm::service::Timing::postSourceEvent |
( |
StreamID |
sid | ) |
|
|
private |
◆ postSourceLumi()
◆ postSourceRun()
void edm::service::Timing::postSourceRun |
( |
RunIndex |
index | ) |
|
|
private |
◆ preBeginJob()
◆ preEvent()
void edm::service::Timing::preEvent |
( |
StreamContext const & |
iStream | ) |
|
|
private |
◆ preLockEventSetupGet()
◆ preModule()
◆ preModuleGlobal()
◆ preModuleStream()
◆ preOpenFile()
void edm::service::Timing::preOpenFile |
( |
std::string const & |
lfn, |
|
|
bool |
b |
|
) |
| |
|
private |
◆ preSourceEvent()
void edm::service::Timing::preSourceEvent |
( |
StreamID |
sid | ) |
|
|
private |
◆ preSourceLumi()
◆ preSourceRun()
void edm::service::Timing::preSourceRun |
( |
RunIndex |
index | ) |
|
|
private |
◆ accumulatedTimeForGet_
double edm::service::Timing::accumulatedTimeForGet_ |
|
private |
◆ accumulatedTimeForLock_
double edm::service::Timing::accumulatedTimeForLock_ |
|
private |
◆ begin_lumi_count_
std::atomic<unsigned long> edm::service::Timing::begin_lumi_count_ |
|
private |
◆ begin_run_count_
std::atomic<unsigned long> edm::service::Timing::begin_run_count_ |
|
private |
◆ configuredInTopLevelProcess_
bool edm::service::Timing::configuredInTopLevelProcess_ |
|
private |
Definition at line 148 of file Timing.cc.
Referenced by postBeginJob(), postCommon(), postEndJob(), postEvent(), postGlobalBeginLumi(), postGlobalBeginRun(), postLockEventSetupGet(), postModuleEvent(), preBeginJob(), preEvent(), preLockEventSetupGet(), preModule(), preModuleGlobal(), preModuleStream(), preOpenFile(), preSourceEvent(), preSourceLumi(), and preSourceRun().
◆ countAndTimeForGet_
std::atomic<CountAndTime*> edm::service::Timing::countAndTimeForGet_ |
|
private |
◆ countAndTimeForLock_
std::atomic<CountAndTime*> edm::service::Timing::countAndTimeForLock_ |
|
private |
◆ countAndTimeZero_
◆ countSubProcessesPostEvent_
std::vector<std::unique_ptr<std::atomic<unsigned int> > > edm::service::Timing::countSubProcessesPostEvent_ |
|
private |
◆ countSubProcessesPreEvent_
std::vector<std::unique_ptr<std::atomic<unsigned int> > > edm::service::Timing::countSubProcessesPreEvent_ |
|
private |
◆ curr_events_time_
std::vector<double> edm::service::Timing::curr_events_time_ |
|
private |
◆ curr_job_cpu_
double edm::service::Timing::curr_job_cpu_ |
|
private |
◆ curr_job_time_
double edm::service::Timing::curr_job_time_ |
|
private |
◆ extra_job_cpu_
std::atomic<double> edm::service::Timing::extra_job_cpu_ |
|
private |
◆ last_run_cpu_
std::atomic<double> edm::service::Timing::last_run_cpu_ |
|
private |
◆ last_run_time_
std::atomic<double> edm::service::Timing::last_run_time_ |
|
private |
◆ max_events_time_
std::vector<double> edm::service::Timing::max_events_time_ |
|
private |
◆ min_events_time_
std::vector<double> edm::service::Timing::min_events_time_ |
|
private |
◆ nStreams_
unsigned int edm::service::Timing::nStreams_ |
|
private |
◆ nSubProcesses_
unsigned int edm::service::Timing::nSubProcesses_ |
|
private |
◆ nThreads_
unsigned int edm::service::Timing::nThreads_ |
|
private |
◆ report_summary_
bool edm::service::Timing::report_summary_ |
|
private |
◆ sum_events_time_
std::vector<double> edm::service::Timing::sum_events_time_ |
|
private |
◆ summary_only_
bool edm::service::Timing::summary_only_ |
|
private |
◆ threshold_
double edm::service::Timing::threshold_ |
|
private |
◆ total_event_count_
std::atomic<unsigned long> edm::service::Timing::total_event_count_ |
|
private |
std::atomic< CountAndTime * > countAndTimeForGet_
void postEvent(StreamContext const &)
double accumulatedTimeForLock_
std::atomic< unsigned long > begin_lumi_count_
void preSourceEvent(StreamID)
void preLockEventSetupGet(eventsetup::ComponentDescription const *, eventsetup::EventSetupRecordKey const &, eventsetup::DataKey const &)
void preOpenFile(std::string const &, bool)
std::vector< std::unique_ptr< std::atomic< unsigned int > > > countSubProcessesPreEvent_
void postEventSetupGet(eventsetup::ComponentDescription const *, eventsetup::EventSetupRecordKey const &, eventsetup::DataKey const &)
static double jobStartTime()
std::atomic< unsigned long > begin_run_count_
void postGlobalBeginRun(GlobalContext const &)
double accumulatedTimeForGet_
std::vector< double > curr_events_time_
void postLockEventSetupGet(eventsetup::ComponentDescription const *, eventsetup::EventSetupRecordKey const &, eventsetup::DataKey const &)
void accumulateTimeEnd(std::atomic< CountAndTime * > &countAndTime, double &accumulatedTime)
void postModuleEvent(StreamContext const &, ModuleCallingContext const &)
void postSourceEvent(StreamID)
static std::string ui2str(unsigned int i)
void postSourceRun(RunIndex)
void preBeginJob(PathsAndConsumesOfModulesBase const &, ProcessContext const &)
static std::string d2str(double d)
CountAndTime countAndTimeZero_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void postOpenFile(std::string const &, bool)
std::atomic< double > extra_job_cpu_
std::vector< std::unique_ptr< std::atomic< unsigned int > > > countSubProcessesPostEvent_
void lastPostEvent(double curr_event_time, unsigned int index, StreamContext const &iStream)
void preSourceLumi(LuminosityBlockIndex)
void preEvent(StreamContext const &)
void postGlobalBeginLumi(GlobalContext const &)
std::vector< double > max_events_time_
static void pushStack(bool configuredInTopLevelProcess)
std::atomic< unsigned long > total_event_count_
std::vector< double > min_events_time_
unsigned int nSubProcesses_
bool configuredInTopLevelProcess_
void setComment(std::string const &value)
std::vector< double > sum_events_time_
void postModuleGlobal(GlobalContext const &, ModuleCallingContext const &)
void preModule(ModuleDescription const &md)
double postCommon() const
void postSourceLumi(LuminosityBlockIndex)
void preModuleStream(StreamContext const &, ModuleCallingContext const &)
void postModule(ModuleDescription const &md)
void accumulateTimeBegin(std::atomic< CountAndTime * > &countAndTime, double &accumulatedTime)
void preModuleGlobal(GlobalContext const &, ModuleCallingContext const &)
std::atomic< double > last_run_cpu_
void postModuleStream(StreamContext const &, ModuleCallingContext const &)
void preSourceRun(RunIndex)
std::atomic< CountAndTime * > countAndTimeForLock_
std::atomic< double > last_run_time_