CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
edm::service::Timing Class Reference
Inheritance diagram for edm::service::Timing:
edm::TimingServiceBase

Public Types

using double_seconds = std::chrono::duration< double, std::ratio< 1, 1 > >
 
using time_point = std::chrono::steady_clock::time_point
 

Public Member Functions

void addToCPUTime (double iTime) override
 
double getTotalCPU () const override
 
 Timing (ParameterSet const &, ActivityRegistry &)
 
 ~Timing () override
 
- Public Member Functions inherited from edm::TimingServiceBase
const TimingServiceBaseoperator= (const TimingServiceBase &)=delete
 
 TimingServiceBase ()
 
 TimingServiceBase (const TimingServiceBase &)=delete
 
virtual ~TimingServiceBase ()
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::TimingServiceBase
static void jobStarted ()
 
static std::chrono::steady_clock::time_point jobStartTime ()
 

Private Member Functions

void addTask ()
 
void beginProcessing ()
 
void lastPostEvent (std::chrono::steady_clock::duration curr_event_time, unsigned int index, StreamContext const &iStream)
 
double postCommon () const
 
void postEndJob ()
 
void postEvent (StreamContext const &)
 
void postGlobalBeginLumi (GlobalContext const &)
 
void postGlobalBeginRun (GlobalContext 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 &)
 
void postSourceEvent (StreamID)
 
void postSourceLumi (LuminosityBlockIndex)
 
void postSourceRun (RunIndex)
 
void preBeginJob (PathsAndConsumesOfModulesBase const &, ProcessContext const &)
 
void preEvent (StreamContext const &)
 
void preModule (ModuleDescription const &md)
 
void preModuleGlobal (GlobalContext const &, ModuleCallingContext const &)
 
void preModuleStream (StreamContext const &, ModuleCallingContext const &)
 
void preOpenFile (std::string const &)
 
void preSourceEvent (StreamID)
 
void preSourceLumi (LuminosityBlockIndex)
 
void preSourceRun (RunIndex)
 
void removeTask ()
 
void runningTasksChanged (bool iMoreTasks)
 
void setTaskCallbacks (ActivityRegistry &)
 

Private Attributes

std::atomic< double > accumulatedEventSetupModuleTimings_ = 0.
 
std::atomic< unsigned long > begin_lumi_count_
 
std::atomic< unsigned long > begin_run_count_
 
bool configuredInTopLevelProcess_
 
std::vector< std::unique_ptr< std::atomic< unsigned int > > > countSubProcessesPostEvent_
 
std::vector< std::unique_ptr< std::atomic< unsigned int > > > countSubProcessesPreEvent_
 
std::vector< time_pointcurr_events_time_
 
double curr_job_cpu_
 
time_point curr_job_time_
 
std::atomic< double > end_loop_cpu_
 
std::atomic< time_pointend_loop_time_
 
std::vector< std::pair< uintptr_t, eventsetup::EventSetupRecordKey > > eventSetupModuleCallInfo_
 
std::vector< std::unique_ptr< std::atomic< time_point > > > eventSetupModuleStartTimes_
 
std::atomic< double > extra_job_cpu_
 
time_point last_task_change_time_ = time_point()
 
std::vector< double > max_events_time_
 
std::vector< double > min_events_time_
 
unsigned int nStreams_
 
unsigned int nSubProcesses_
 
unsigned int nThreads_
 
unsigned int num_running_tasks_ = 0
 
bool report_summary_
 
std::vector< double > sum_events_time_
 
bool summary_only_
 
double threshold_
 
std::atomic< unsigned long > total_event_count_
 
double total_time_without_tasks_ = 0
 
std::atomic< bool > updating_task_info_ = false
 

Detailed Description

Definition at line 48 of file Timing.cc.

Member Typedef Documentation

◆ double_seconds

using edm::service::Timing::double_seconds = std::chrono::duration<double, std::ratio<1, 1> >

Definition at line 51 of file Timing.cc.

◆ time_point

using edm::service::Timing::time_point = std::chrono::steady_clock::time_point

Definition at line 50 of file Timing.cc.

Constructor & Destructor Documentation

◆ Timing()

edm::service::Timing::Timing ( ParameterSet const &  iPS,
ActivityRegistry iRegistry 
)

Definition at line 215 of file Timing.cc.

216  : curr_job_time_(),
217  curr_job_cpu_(0.),
218  extra_job_cpu_(0.0),
219  end_loop_time_(),
220  end_loop_cpu_(0.0),
222  summary_only_(iPS.getUntrackedParameter<bool>("summaryOnly")),
223  report_summary_(iPS.getUntrackedParameter<bool>("useJobReport")),
224  threshold_(iPS.getUntrackedParameter<double>("excessiveTimeThreshold")),
229  begin_run_count_(0),
231  nSubProcesses_{0} {
232  iRegistry.watchPreBeginJob(this, &Timing::preBeginJob);
233  iRegistry.watchBeginProcessing(this, &Timing::beginProcessing);
234  iRegistry.watchPreEndJob([this]() {
236  end_loop_cpu_ = getCPU();
237  });
238  iRegistry.watchPostEndJob(this, &Timing::postEndJob);
239 
240  iRegistry.watchPreEvent(this, &Timing::preEvent);
241  iRegistry.watchPostEvent(this, &Timing::postEvent);
242 
243  bool checkThreshold = true;
244  if (threshold_ <= 0.0) {
245  //we need to ignore the threshold check
247  checkThreshold = false;
248  }
249 
250  if ((not summary_only_) || (checkThreshold)) {
251  iRegistry.watchPreModuleEvent(this, &Timing::preModuleStream);
252  iRegistry.watchPostModuleEvent(this, &Timing::postModuleEvent);
253  iRegistry.watchPreModuleEventAcquire(this, &Timing::preModuleStream);
254  iRegistry.watchPostModuleEventAcquire(this, &Timing::postModuleEvent);
255  }
256  if (checkThreshold) {
257  iRegistry.watchPreSourceEvent(this, &Timing::preSourceEvent);
258  iRegistry.watchPostSourceEvent(this, &Timing::postSourceEvent);
259 
260  iRegistry.watchPreSourceLumi(this, &Timing::preSourceLumi);
261  iRegistry.watchPostSourceLumi(this, &Timing::postSourceLumi);
262 
263  iRegistry.watchPreSourceRun(this, &Timing::preSourceRun);
264  iRegistry.watchPostSourceRun(this, &Timing::postSourceRun);
265 
266  iRegistry.watchPreOpenFile(this, &Timing::preOpenFile);
267  iRegistry.watchPostOpenFile(this, &Timing::postOpenFile);
268 
269  iRegistry.watchPreEventReadFromSource(this, &Timing::preModuleStream);
270  iRegistry.watchPostEventReadFromSource(this, &Timing::postModuleStream);
271 
272  iRegistry.watchPreModuleConstruction(this, &Timing::preModule);
273  iRegistry.watchPostModuleConstruction(this, &Timing::postModule);
274 
275  iRegistry.watchPreModuleDestruction(this, &Timing::preModule);
276  iRegistry.watchPostModuleDestruction(this, &Timing::postModule);
277 
278  iRegistry.watchPreModuleBeginJob(this, &Timing::preModule);
279  iRegistry.watchPostModuleBeginJob(this, &Timing::postModule);
280 
281  iRegistry.watchPreModuleEndJob(this, &Timing::preModule);
282  iRegistry.watchPostModuleEndJob(this, &Timing::postModule);
283 
284  iRegistry.watchPreModuleStreamBeginRun(this, &Timing::preModuleStream);
285  iRegistry.watchPostModuleStreamBeginRun(this, &Timing::postModuleStream);
286  iRegistry.watchPreModuleStreamEndRun(this, &Timing::preModuleStream);
287  iRegistry.watchPostModuleStreamEndRun(this, &Timing::postModuleStream);
288 
289  iRegistry.watchPreModuleStreamBeginLumi(this, &Timing::preModuleStream);
290  iRegistry.watchPostModuleStreamBeginLumi(this, &Timing::postModuleStream);
291  iRegistry.watchPreModuleStreamEndLumi(this, &Timing::preModuleStream);
292  iRegistry.watchPostModuleStreamEndLumi(this, &Timing::postModuleStream);
293 
294  iRegistry.watchPreModuleGlobalBeginRun(this, &Timing::preModuleGlobal);
295  iRegistry.watchPostModuleGlobalBeginRun(this, &Timing::postModuleGlobal);
296  iRegistry.watchPreModuleGlobalEndRun(this, &Timing::preModuleGlobal);
297  iRegistry.watchPostModuleGlobalEndRun(this, &Timing::postModuleGlobal);
298 
299  iRegistry.watchPreModuleGlobalBeginLumi(this, &Timing::preModuleGlobal);
300  iRegistry.watchPostModuleGlobalBeginLumi(this, &Timing::postModuleGlobal);
301  iRegistry.watchPreModuleGlobalEndLumi(this, &Timing::preModuleGlobal);
302  iRegistry.watchPostModuleGlobalEndLumi(this, &Timing::postModuleGlobal);
303 
304  iRegistry.watchPreSourceConstruction(this, &Timing::preModule);
305  iRegistry.watchPostSourceConstruction(this, &Timing::postModule);
306  }
307 
308  auto preESModuleLambda = [this](auto const& recordKey, auto const& context) {
309  addTask();
310  //find available slot
311  auto startTime = getTime();
312  bool foundSlot = false;
313  do {
314  for (size_t i = 0; i < eventSetupModuleStartTimes_.size(); ++i) {
316  std::chrono::steady_clock::time_point expect;
317  if (slot.compare_exchange_strong(expect, startTime)) {
318  foundSlot = true;
319  eventSetupModuleCallInfo_[i].first = uintptr_t(context.componentDescription());
320  eventSetupModuleCallInfo_[i].second = recordKey;
321  break;
322  }
323  }
324  //if foundSlot == false then other threads stole the slots before this thread
325  // so should check starting over again
326  } while (not foundSlot);
327  };
328  iRegistry.watchPreESModule(preESModuleLambda);
329  iRegistry.watchPreESModuleAcquire(preESModuleLambda);
330 
331  auto postESModuleLambda = [this](auto const& recordKey, auto const& context) {
332  removeTask();
333  auto stopTime = getTime();
334  for (size_t i = 0; i < eventSetupModuleStartTimes_.size(); ++i) {
335  auto const& info = eventSetupModuleCallInfo_[i];
336  if (info.first == uintptr_t(context.componentDescription()) and info.second == recordKey) {
337  auto startTime = eventSetupModuleStartTimes_[i]->exchange(std::chrono::steady_clock::time_point());
338  auto expect = accumulatedEventSetupModuleTimings_.load();
339  double_seconds timeDiff = stopTime - startTime;
340  auto accumulatedTime = expect + timeDiff.count();
341  while (not accumulatedEventSetupModuleTimings_.compare_exchange_strong(expect, accumulatedTime)) {
342  accumulatedTime = expect + timeDiff.count();
343  }
344  break;
345  }
346  }
347  };
348  iRegistry.watchPostESModule(postESModuleLambda);
349  iRegistry.watchPostESModuleAcquire(postESModuleLambda);
350 
351  iRegistry.watchPostGlobalBeginRun(this, &Timing::postGlobalBeginRun);
352  iRegistry.watchPostGlobalBeginLumi(this, &Timing::postGlobalBeginLumi);
353 
354  iRegistry.watchPreallocate([this](service::SystemBounds const& iBounds) {
355  nStreams_ = iBounds.maxNumberOfStreams();
356  nThreads_ = iBounds.maxNumberOfThreads();
358  sum_events_time_.resize(nStreams_, 0.);
359  max_events_time_.resize(nStreams_, 0.);
360  min_events_time_.resize(nStreams_, 1.E6);
362  for (unsigned int i = 0; i < nThreads_; ++i) {
363  eventSetupModuleStartTimes_.emplace_back(std::make_unique<std::atomic<time_point>>());
364  }
366 
367  for (unsigned int i = 0; i < nStreams_; ++i) {
368  countSubProcessesPreEvent_.emplace_back(std::make_unique<std::atomic<unsigned int>>(0));
369  countSubProcessesPostEvent_.emplace_back(std::make_unique<std::atomic<unsigned int>>(0));
370  }
371  });
372  setTaskCallbacks(iRegistry);
373  }
std::vector< double > sum_events_time_
Definition: Timing.cc:125
static const TGPicture * info(bool iBackgroundIsBlack)
std::vector< double > max_events_time_
Definition: Timing.cc:123
void setTaskCallbacks(ActivityRegistry &)
Definition: Timing.cc:375
static std::chrono::steady_clock::time_point getTime()
Definition: Timing.cc:160
void preModule(ModuleDescription const &md)
Definition: Timing.cc:655
static double getCPU()
Definition: Timing.cc:172
void postEvent(StreamContext const &)
Definition: Timing.cc:593
void preModuleStream(StreamContext const &, ModuleCallingContext const &)
Definition: Timing.cc:683
double curr_job_cpu_
Definition: Timing.cc:106
std::atomic< unsigned long > begin_lumi_count_
Definition: Timing.cc:127
void preSourceLumi(LuminosityBlockIndex)
Definition: Timing.cc:643
unsigned int nThreads_
Definition: Timing.cc:130
unsigned int nStreams_
Definition: Timing.cc:129
void preModuleGlobal(GlobalContext const &, ModuleCallingContext const &)
Definition: Timing.cc:659
void postModule(ModuleDescription const &md)
Definition: Timing.cc:657
void postGlobalBeginRun(GlobalContext const &)
Definition: Timing.cc:665
void preSourceRun(RunIndex)
Definition: Timing.cc:647
void postModuleStream(StreamContext const &, ModuleCallingContext const &)
Definition: Timing.cc:687
void preOpenFile(std::string const &)
Definition: Timing.cc:651
void postModuleEvent(StreamContext const &, ModuleCallingContext const &)
Definition: Timing.cc:626
void postSourceLumi(LuminosityBlockIndex)
Definition: Timing.cc:645
std::chrono::steady_clock::time_point time_point
Definition: Timing.cc:50
std::atomic< double > end_loop_cpu_
Definition: Timing.cc:110
std::vector< time_point > curr_events_time_
Definition: Timing.cc:111
std::vector< std::unique_ptr< std::atomic< unsigned int > > > countSubProcessesPreEvent_
Definition: Timing.cc:136
std::vector< std::unique_ptr< std::atomic< unsigned int > > > countSubProcessesPostEvent_
Definition: Timing.cc:137
void postOpenFile(std::string const &)
Definition: Timing.cc:653
void postGlobalBeginLumi(GlobalContext const &)
Definition: Timing.cc:674
std::atomic< unsigned long > begin_run_count_
Definition: Timing.cc:128
std::atomic< time_point > end_loop_time_
Definition: Timing.cc:109
std::atomic< double > accumulatedEventSetupModuleTimings_
Definition: Timing.cc:134
std::atomic< unsigned long > total_event_count_
Definition: Timing.cc:126
bool configuredInTopLevelProcess_
Definition: Timing.cc:139
void postSourceRun(RunIndex)
Definition: Timing.cc:649
void postModuleGlobal(GlobalContext const &, ModuleCallingContext const &)
Definition: Timing.cc:663
time_point curr_job_time_
Definition: Timing.cc:105
void preBeginJob(PathsAndConsumesOfModulesBase const &, ProcessContext const &)
Definition: Timing.cc:441
std::chrono::duration< double, std::ratio< 1, 1 > > double_seconds
Definition: Timing.cc:51
void postSourceEvent(StreamID)
Definition: Timing.cc:641
void beginProcessing()
Definition: Timing.cc:449
std::atomic< double > extra_job_cpu_
Definition: Timing.cc:107
std::vector< std::unique_ptr< std::atomic< time_point > > > eventSetupModuleStartTimes_
Definition: Timing.cc:132
void preSourceEvent(StreamID)
Definition: Timing.cc:639
void preEvent(StreamContext const &)
Definition: Timing.cc:576
std::vector< std::pair< uintptr_t, eventsetup::EventSetupRecordKey > > eventSetupModuleCallInfo_
Definition: Timing.cc:133
std::vector< double > min_events_time_
Definition: Timing.cc:124
unsigned int nSubProcesses_
Definition: Timing.cc:140

◆ ~Timing()

edm::service::Timing::~Timing ( )
override

Definition at line 418 of file Timing.cc.

418 {}

Member Function Documentation

◆ addTask()

void edm::service::Timing::addTask ( )
inlineprivate

Definition at line 101 of file Timing.cc.

References runningTasksChanged().

Referenced by setTaskCallbacks().

101 { runningTasksChanged(true); }
void runningTasksChanged(bool iMoreTasks)
Definition: Timing.cc:703

◆ addToCPUTime()

void edm::service::Timing::addToCPUTime ( double  iTime)
overridevirtual

Extra CPU time used by a job but not seen by cmsRun The value should be in seconds. This function is safe to call from multiple threads

Implements edm::TimingServiceBase.

Definition at line 420 of file Timing.cc.

References extra_job_cpu_.

420  {
421  //For accounting purposes we effectively can say we started earlier
422  double expected = extra_job_cpu_.load();
423  while (not extra_job_cpu_.compare_exchange_strong(expected, expected + iTime)) {
424  }
425  }
std::atomic< double > extra_job_cpu_
Definition: Timing.cc:107

◆ beginProcessing()

void edm::service::Timing::beginProcessing ( )
private

Definition at line 449 of file Timing.cc.

References configuredInTopLevelProcess_, curr_job_cpu_, curr_job_time_, edm::service::getCPU(), edm::service::getTime(), last_task_change_time_, seconds(), and summary_only_.

449  {
451  return;
452  }
454  curr_job_cpu_ = getCPU();
456 
457  if (not summary_only_) {
458  LogImportant("TimeReport")
459  << "TimeReport> Report activated"
460  << "\n"
461  << "TimeReport> Report columns headings for events: "
462  << "eventnum runnum timetaken\n"
463  << "TimeReport> Report columns headings for modules: "
464  << "eventnum runnum modulelabel modulename timetaken\n"
465  << "TimeReport> JobTime="
466  << std::chrono::time_point_cast<std::chrono::seconds>(curr_job_time_).time_since_epoch().count()
467  << " JobCPU=" << curr_job_cpu_ << "\n";
468  }
469  }
double seconds()
static std::chrono::steady_clock::time_point getTime()
Definition: Timing.cc:160
static double getCPU()
Definition: Timing.cc:172
double curr_job_cpu_
Definition: Timing.cc:106
Log< level::Error, true > LogImportant
bool configuredInTopLevelProcess_
Definition: Timing.cc:139
time_point curr_job_time_
Definition: Timing.cc:105
time_point last_task_change_time_
Definition: Timing.cc:118

◆ fillDescriptions()

void edm::service::Timing::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 429 of file Timing.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, and edm::ConfigurationDescriptions::setComment().

429  {
431  desc.addUntracked<bool>("summaryOnly", false)->setComment("If 'true' do not report timing for each event");
432  desc.addUntracked<bool>("useJobReport", true)->setComment("If 'true' write summary information to JobReport");
433  desc.addUntracked<double>("excessiveTimeThreshold", 0.)
434  ->setComment(
435  "Amount of time in seconds before reporting a module or source has taken excessive time. A value of 0.0 "
436  "turns off this reporting.");
437  descriptions.add("Timing", desc);
438  descriptions.setComment("This service reports the time it takes to run each module in a job.");
439  }
void setComment(std::string const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ getTotalCPU()

double edm::service::Timing::getTotalCPU ( ) const
overridevirtual

CPU time used by this process and all its children. The value returned should be in seconds.

Implements edm::TimingServiceBase.

Definition at line 427 of file Timing.cc.

References edm::service::getCPU().

427 { return getCPU(); }
static double getCPU()
Definition: Timing.cc:172

◆ lastPostEvent()

void edm::service::Timing::lastPostEvent ( std::chrono::steady_clock::duration  curr_event_time,
unsigned int  index,
StreamContext const &  iStream 
)
private

Definition at line 609 of file Timing.cc.

References edm::StreamContext::eventID(), max_events_time_, min_events_time_, sum_events_time_, summary_only_, and total_event_count_.

Referenced by postEvent().

611  {
612  double curr_event_time_d = double_seconds(curr_event_time).count();
613  sum_events_time_[index] += curr_event_time_d;
614 
615  if (not summary_only_) {
616  auto const& eventID = iStream.eventID();
617  LogPrint("TimeEvent") << "TimeEvent> " << eventID.event() << " " << eventID.run() << " " << curr_event_time_d;
618  }
619  if (curr_event_time_d > max_events_time_[index])
620  max_events_time_[index] = curr_event_time_d;
621  if (curr_event_time_d < min_events_time_[index])
622  min_events_time_[index] = curr_event_time_d;
624  }
std::vector< double > sum_events_time_
Definition: Timing.cc:125
std::vector< double > max_events_time_
Definition: Timing.cc:123
Log< level::Warning, true > LogPrint
std::atomic< unsigned long > total_event_count_
Definition: Timing.cc:126
std::chrono::duration< double, std::ratio< 1, 1 > > double_seconds
Definition: Timing.cc:51
std::vector< double > min_events_time_
Definition: Timing.cc:124

◆ postCommon()

double edm::service::Timing::postCommon ( ) const
private

Definition at line 689 of file Timing.cc.

References configuredInTopLevelProcess_, edm::service::popStack(), submitPVValidationJobs::t, and threshold_.

Referenced by postModule(), postModuleEvent(), postModuleGlobal(), postModuleStream(), postOpenFile(), postSourceEvent(), postSourceLumi(), and postSourceRun().

689  {
691  return 0.0;
692  }
693  double t = popStack();
694  if (t > threshold_) {
695  LogError("ExcessiveTime")
696  << "ExcessiveTime: Module used " << t
697  << " seconds of time which exceeds the error threshold configured in the Timing Service of " << threshold_
698  << " seconds.";
699  }
700  return t;
701  }
Log< level::Error, false > LogError
bool configuredInTopLevelProcess_
Definition: Timing.cc:139
static double popStack()
Definition: Timing.cc:198

◆ postEndJob()

void edm::service::Timing::postEndJob ( )
private

Definition at line 471 of file Timing.cc.

References accumulatedEventSetupModuleTimings_, begin_lumi_count_, begin_run_count_, configuredInTopLevelProcess_, submitPVResolutionJobs::count, curr_job_cpu_, curr_job_time_, edm::service::d2str(), end_loop_cpu_, end_loop_time_, extra_job_cpu_, edm::service::getChildrenCPU(), edm::service::getCPU(), edm::service::getTime(), edm::TimingServiceBase::jobStartTime(), max_events_time_, min_events_time_, nStreams_, nThreads_, report_summary_, sum_events_time_, submitPVValidationJobs::t, total_event_count_, total_time_without_tasks_, and edm::service::ui2str().

471  {
473  LogImportant("TimeReport") << "\nTimeReport> This instance of the Timing Service will be disabled because it "
474  "is configured in a SubProcess.\n"
475  << "If multiple instances of the TimingService were configured only the one in the "
476  "top level process will function.\n"
477  << "The other instance(s) will simply print this message and do nothing.\n\n";
478  return;
479  }
480 
481  const auto job_end_time = getTime();
482  const double job_end_cpu = getCPU();
483  auto total_job_time = double_seconds(job_end_time - jobStartTime()).count();
484 
485  double total_job_cpu = job_end_cpu + extra_job_cpu_;
486 
487  const double job_end_children_cpu = getChildrenCPU();
488 
489  const double total_initialization_time = double_seconds(curr_job_time_ - jobStartTime()).count();
490  const double total_initialization_cpu = curr_job_cpu_;
491 
492  if (time_point() == jobStartTime()) {
493  //did not capture beginning time
494  total_job_time = double_seconds(job_end_time - curr_job_time_).count();
495  total_job_cpu = job_end_cpu + extra_job_cpu_ - curr_job_cpu_;
496  }
497 
498  double min_event_time = *(std::min_element(min_events_time_.begin(), min_events_time_.end()));
499  double max_event_time = *(std::max_element(max_events_time_.begin(), max_events_time_.end()));
500 
501  auto total_loop_time = double_seconds(end_loop_time_.load() - curr_job_time_).count();
502  auto total_loop_cpu = end_loop_cpu_ + extra_job_cpu_ - curr_job_cpu_;
503 
504  if (end_loop_time_.load() == time_point()) {
505  total_loop_time = 0.0;
506  total_loop_cpu = 0.0;
507  }
508 
509  double sum_all_events_time = 0;
510  for (auto t : sum_events_time_) {
511  sum_all_events_time += t;
512  }
513 
514  double average_event_time = 0.0;
515  if (total_event_count_ != 0) {
516  average_event_time = sum_all_events_time / total_event_count_;
517  }
518 
519  double event_throughput = 0.0;
520  if (total_loop_time != 0.0) {
521  event_throughput = total_event_count_ / total_loop_time;
522  }
523 
524  LogImportant("TimeReport") << "TimeReport> Time report complete in " << total_job_time << " seconds"
525  << "\n"
526  << " Time Summary: \n"
527  << " - Min event: " << min_event_time << "\n"
528  << " - Max event: " << max_event_time << "\n"
529  << " - Avg event: " << average_event_time << "\n"
530  << " - Total loop: " << total_loop_time << "\n"
531  << " - Total init: " << total_initialization_time << "\n"
532  << " - Total job: " << total_job_time << "\n"
533  << " - Total EventSetup: " << accumulatedEventSetupModuleTimings_.load() << "\n"
534  << " - Total non-module: " << total_time_without_tasks_ << "\n"
535  << " Event Throughput: " << event_throughput << " ev/s\n"
536  << " CPU Summary: \n"
537  << " - Total loop: " << total_loop_cpu << "\n"
538  << " - Total init: " << total_initialization_cpu << "\n"
539  << " - Total extra: " << extra_job_cpu_ << "\n"
540  << " - Total children: " << job_end_children_cpu << "\n"
541  << " - Total job: " << total_job_cpu << "\n"
542  << " Processing Summary: \n"
543  << " - Number of Events: " << total_event_count_ << "\n"
544  << " - Number of Global Begin Lumi Calls: " << begin_lumi_count_ << "\n"
545  << " - Number of Global Begin Run Calls: " << begin_run_count_ << "\n";
546 
547  if (report_summary_) {
548  Service<JobReport> reportSvc;
549  std::map<std::string, std::string> reportData;
550 
551  reportData.insert(std::make_pair("MinEventTime", d2str(min_event_time)));
552  reportData.insert(std::make_pair("MaxEventTime", d2str(max_event_time)));
553  reportData.insert(std::make_pair("AvgEventTime", d2str(average_event_time)));
554  reportData.insert(std::make_pair("EventThroughput", d2str(event_throughput)));
555  reportData.insert(std::make_pair("TotalJobTime", d2str(total_job_time)));
556  reportData.insert(std::make_pair("TotalJobCPU", d2str(total_job_cpu)));
557  reportData.insert(std::make_pair("TotalJobChildrenCPU", d2str(job_end_children_cpu)));
558  reportData.insert(std::make_pair("TotalLoopTime", d2str(total_loop_time)));
559  reportData.insert(std::make_pair("TotalEventSetupTime", d2str(accumulatedEventSetupModuleTimings_.load())));
560  reportData.insert(std::make_pair("TotalNonModuleTime", d2str(total_time_without_tasks_)));
561  reportData.insert(std::make_pair("TotalLoopCPU", d2str(total_loop_cpu)));
562  reportData.insert(std::make_pair("TotalInitTime", d2str(total_initialization_time)));
563  reportData.insert(std::make_pair("TotalInitCPU", d2str(total_initialization_cpu)));
564  reportData.insert(std::make_pair("NumberOfStreams", ui2str(nStreams_)));
565  reportData.insert(std::make_pair("NumberOfThreads", ui2str(nThreads_)));
566  reportSvc->reportPerformanceSummary("Timing", reportData);
567 
568  std::map<std::string, std::string> reportData1;
569  reportData1.insert(std::make_pair("NumberEvents", ui2str(total_event_count_)));
570  reportData1.insert(std::make_pair("NumberBeginLumiCalls", ui2str(begin_lumi_count_)));
571  reportData1.insert(std::make_pair("NumberBeginRunCalls", ui2str(begin_run_count_)));
572  reportSvc->reportPerformanceSummary("ProcessingSummary", reportData1);
573  }
574  }
std::vector< double > sum_events_time_
Definition: Timing.cc:125
std::vector< double > max_events_time_
Definition: Timing.cc:123
static std::chrono::steady_clock::time_point getTime()
Definition: Timing.cc:160
static double getCPU()
Definition: Timing.cc:172
double curr_job_cpu_
Definition: Timing.cc:106
std::atomic< unsigned long > begin_lumi_count_
Definition: Timing.cc:127
unsigned int nThreads_
Definition: Timing.cc:130
unsigned int nStreams_
Definition: Timing.cc:129
double total_time_without_tasks_
Definition: Timing.cc:119
Log< level::Error, true > LogImportant
std::chrono::steady_clock::time_point time_point
Definition: Timing.cc:50
std::atomic< double > end_loop_cpu_
Definition: Timing.cc:110
static std::string ui2str(unsigned int i)
Definition: Timing.cc:154
std::atomic< unsigned long > begin_run_count_
Definition: Timing.cc:128
std::atomic< time_point > end_loop_time_
Definition: Timing.cc:109
std::atomic< double > accumulatedEventSetupModuleTimings_
Definition: Timing.cc:134
std::atomic< unsigned long > total_event_count_
Definition: Timing.cc:126
static std::string d2str(double d)
bool configuredInTopLevelProcess_
Definition: Timing.cc:139
time_point curr_job_time_
Definition: Timing.cc:105
std::chrono::duration< double, std::ratio< 1, 1 > > double_seconds
Definition: Timing.cc:51
static std::chrono::steady_clock::time_point jobStartTime()
std::atomic< double > extra_job_cpu_
Definition: Timing.cc:107
static double getChildrenCPU()
Definition: Timing.cc:162
std::vector< double > min_events_time_
Definition: Timing.cc:124

◆ postEvent()

void edm::service::Timing::postEvent ( StreamContext const &  iStream)
private

Definition at line 593 of file Timing.cc.

References configuredInTopLevelProcess_, submitPVResolutionJobs::count, countSubProcessesPostEvent_, curr_events_time_, edm::service::getTime(), lastPostEvent(), nSubProcesses_, edm::StreamContext::streamID(), and edm::StreamID::value().

593  {
595  return;
596  }
597  auto index = iStream.streamID().value();
598  if (nSubProcesses_ == 0u) {
600  } else {
601  unsigned int count = ++(*countSubProcessesPostEvent_[index]);
602  if (count == (nSubProcesses_ + 1)) {
605  }
606  }
607  }
static std::chrono::steady_clock::time_point getTime()
Definition: Timing.cc:160
void lastPostEvent(std::chrono::steady_clock::duration curr_event_time, unsigned int index, StreamContext const &iStream)
Definition: Timing.cc:609
std::vector< time_point > curr_events_time_
Definition: Timing.cc:111
std::vector< std::unique_ptr< std::atomic< unsigned int > > > countSubProcessesPostEvent_
Definition: Timing.cc:137
bool configuredInTopLevelProcess_
Definition: Timing.cc:139
unsigned int nSubProcesses_
Definition: Timing.cc:140

◆ postGlobalBeginLumi()

void edm::service::Timing::postGlobalBeginLumi ( GlobalContext const &  gc)
private

Definition at line 674 of file Timing.cc.

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

674  {
676  return;
677  }
678  if (!gc.processContext()->isSubProcess()) {
680  }
681  }
std::atomic< unsigned long > begin_lumi_count_
Definition: Timing.cc:127
bool configuredInTopLevelProcess_
Definition: Timing.cc:139

◆ postGlobalBeginRun()

void edm::service::Timing::postGlobalBeginRun ( GlobalContext const &  gc)
private

Definition at line 665 of file Timing.cc.

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

665  {
667  return;
668  }
669  if (!gc.processContext()->isSubProcess()) {
671  }
672  }
std::atomic< unsigned long > begin_run_count_
Definition: Timing.cc:128
bool configuredInTopLevelProcess_
Definition: Timing.cc:139

◆ postModule()

void edm::service::Timing::postModule ( ModuleDescription const &  md)
private

Definition at line 657 of file Timing.cc.

References postCommon().

657 { postCommon(); }
double postCommon() const
Definition: Timing.cc:689

◆ postModuleEvent()

void edm::service::Timing::postModuleEvent ( StreamContext const &  iStream,
ModuleCallingContext const &  iModule 
)
private

Definition at line 626 of file Timing.cc.

References configuredInTopLevelProcess_, submitPVResolutionJobs::desc, edm::StreamContext::eventID(), edm::ModuleCallingContext::moduleDescription(), postCommon(), summary_only_, and submitPVValidationJobs::t.

626  {
628  return;
629  }
630  auto const& eventID = iStream.eventID();
631  auto const& desc = *(iModule.moduleDescription());
632  double t = postCommon();
633  if (not summary_only_) {
634  LogPrint("TimeModule") << "TimeModule> " << eventID.event() << " " << eventID.run() << " " << desc.moduleLabel()
635  << " " << desc.moduleName() << " " << t;
636  }
637  }
double postCommon() const
Definition: Timing.cc:689
Log< level::Warning, true > LogPrint
bool configuredInTopLevelProcess_
Definition: Timing.cc:139

◆ postModuleGlobal()

void edm::service::Timing::postModuleGlobal ( GlobalContext const &  ,
ModuleCallingContext const &  mcc 
)
private

Definition at line 663 of file Timing.cc.

References postCommon().

663 { postCommon(); }
double postCommon() const
Definition: Timing.cc:689

◆ postModuleStream()

void edm::service::Timing::postModuleStream ( StreamContext const &  ,
ModuleCallingContext const &  mcc 
)
private

Definition at line 687 of file Timing.cc.

References postCommon().

687 { postCommon(); }
double postCommon() const
Definition: Timing.cc:689

◆ postOpenFile()

void edm::service::Timing::postOpenFile ( std::string const &  lfn)
private

Definition at line 653 of file Timing.cc.

References postCommon().

653 { postCommon(); }
double postCommon() const
Definition: Timing.cc:689

◆ postSourceEvent()

void edm::service::Timing::postSourceEvent ( StreamID  sid)
private

Definition at line 641 of file Timing.cc.

References postCommon().

641 { postCommon(); }
double postCommon() const
Definition: Timing.cc:689

◆ postSourceLumi()

void edm::service::Timing::postSourceLumi ( LuminosityBlockIndex  index)
private

Definition at line 645 of file Timing.cc.

References postCommon().

645 { postCommon(); }
double postCommon() const
Definition: Timing.cc:689

◆ postSourceRun()

void edm::service::Timing::postSourceRun ( RunIndex  index)
private

Definition at line 649 of file Timing.cc.

References postCommon().

649 { postCommon(); }
double postCommon() const
Definition: Timing.cc:689

◆ preBeginJob()

void edm::service::Timing::preBeginJob ( PathsAndConsumesOfModulesBase const &  pathsAndConsumes,
ProcessContext const &  pc 
)
private

Definition at line 441 of file Timing.cc.

References configuredInTopLevelProcess_, edm::ProcessContext::isSubProcess(), and nSubProcesses_.

441  {
442  if (pc.isSubProcess()) {
443  ++nSubProcesses_;
444  } else {
446  }
447  }
bool configuredInTopLevelProcess_
Definition: Timing.cc:139
unsigned int nSubProcesses_
Definition: Timing.cc:140

◆ preEvent()

void edm::service::Timing::preEvent ( StreamContext const &  iStream)
private

Definition at line 576 of file Timing.cc.

References configuredInTopLevelProcess_, submitPVResolutionJobs::count, countSubProcessesPreEvent_, curr_events_time_, edm::service::getTime(), nSubProcesses_, edm::StreamContext::streamID(), and edm::StreamID::value().

576  {
578  return;
579  }
580  auto index = iStream.streamID().value();
581  if (nSubProcesses_ == 0u) {
583  } else {
584  unsigned int count = ++(*countSubProcessesPreEvent_[index]);
585  if (count == 1) {
587  } else if (count == (nSubProcesses_ + 1)) {
589  }
590  }
591  }
static std::chrono::steady_clock::time_point getTime()
Definition: Timing.cc:160
std::vector< time_point > curr_events_time_
Definition: Timing.cc:111
std::vector< std::unique_ptr< std::atomic< unsigned int > > > countSubProcessesPreEvent_
Definition: Timing.cc:136
bool configuredInTopLevelProcess_
Definition: Timing.cc:139
unsigned int nSubProcesses_
Definition: Timing.cc:140

◆ preModule()

void edm::service::Timing::preModule ( ModuleDescription const &  md)
private

Definition at line 655 of file Timing.cc.

References configuredInTopLevelProcess_, and edm::service::pushStack().

static void pushStack(bool configuredInTopLevelProcess)
Definition: Timing.cc:207
bool configuredInTopLevelProcess_
Definition: Timing.cc:139

◆ preModuleGlobal()

void edm::service::Timing::preModuleGlobal ( GlobalContext const &  ,
ModuleCallingContext const &   
)
private

Definition at line 659 of file Timing.cc.

References configuredInTopLevelProcess_, and edm::service::pushStack().

659  {
661  }
static void pushStack(bool configuredInTopLevelProcess)
Definition: Timing.cc:207
bool configuredInTopLevelProcess_
Definition: Timing.cc:139

◆ preModuleStream()

void edm::service::Timing::preModuleStream ( StreamContext const &  ,
ModuleCallingContext const &   
)
private

Definition at line 683 of file Timing.cc.

References configuredInTopLevelProcess_, and edm::service::pushStack().

683  {
685  }
static void pushStack(bool configuredInTopLevelProcess)
Definition: Timing.cc:207
bool configuredInTopLevelProcess_
Definition: Timing.cc:139

◆ preOpenFile()

void edm::service::Timing::preOpenFile ( std::string const &  lfn)
private

Definition at line 651 of file Timing.cc.

References configuredInTopLevelProcess_, and edm::service::pushStack().

static void pushStack(bool configuredInTopLevelProcess)
Definition: Timing.cc:207
bool configuredInTopLevelProcess_
Definition: Timing.cc:139

◆ preSourceEvent()

void edm::service::Timing::preSourceEvent ( StreamID  sid)
private

Definition at line 639 of file Timing.cc.

References configuredInTopLevelProcess_, and edm::service::pushStack().

static void pushStack(bool configuredInTopLevelProcess)
Definition: Timing.cc:207
bool configuredInTopLevelProcess_
Definition: Timing.cc:139

◆ preSourceLumi()

void edm::service::Timing::preSourceLumi ( LuminosityBlockIndex  index)
private

Definition at line 643 of file Timing.cc.

References configuredInTopLevelProcess_, and edm::service::pushStack().

static void pushStack(bool configuredInTopLevelProcess)
Definition: Timing.cc:207
bool configuredInTopLevelProcess_
Definition: Timing.cc:139

◆ preSourceRun()

void edm::service::Timing::preSourceRun ( RunIndex  index)
private

Definition at line 647 of file Timing.cc.

References configuredInTopLevelProcess_, and edm::service::pushStack().

static void pushStack(bool configuredInTopLevelProcess)
Definition: Timing.cc:207
bool configuredInTopLevelProcess_
Definition: Timing.cc:139

◆ removeTask()

void edm::service::Timing::removeTask ( )
inlineprivate

Definition at line 102 of file Timing.cc.

References runningTasksChanged().

Referenced by setTaskCallbacks().

102 { runningTasksChanged(false); }
void runningTasksChanged(bool iMoreTasks)
Definition: Timing.cc:703

◆ runningTasksChanged()

void edm::service::Timing::runningTasksChanged ( bool  iMoreTasks)
private

Definition at line 703 of file Timing.cc.

References edm::service::getTime(), last_task_change_time_, nThreads_, num_running_tasks_, total_time_without_tasks_, and updating_task_info_.

Referenced by addTask(), and removeTask().

703  {
704  const auto presentTime = getTime();
705  bool expected = false;
706  while (not updating_task_info_.compare_exchange_strong(expected, true)) {
707  expected = false;
708  }
709  auto previousNumberOfTasks = iMoreTasks ? num_running_tasks_++ : num_running_tasks_--;
711  (nThreads_ - previousNumberOfTasks) * double_seconds(presentTime - last_task_change_time_).count();
712  last_task_change_time_ = presentTime;
713  updating_task_info_ = false;
714  }
static std::chrono::steady_clock::time_point getTime()
Definition: Timing.cc:160
unsigned int nThreads_
Definition: Timing.cc:130
unsigned int num_running_tasks_
Definition: Timing.cc:117
std::atomic< bool > updating_task_info_
Definition: Timing.cc:116
double total_time_without_tasks_
Definition: Timing.cc:119
std::chrono::duration< double, std::ratio< 1, 1 > > double_seconds
Definition: Timing.cc:51
time_point last_task_change_time_
Definition: Timing.cc:118

◆ setTaskCallbacks()

void edm::service::Timing::setTaskCallbacks ( ActivityRegistry iRegistry)
private

Definition at line 375 of file Timing.cc.

References addTask(), removeTask(), edm::ActivityRegistry::watchPostESSyncIOV(), edm::ActivityRegistry::watchPostEventReadFromSource(), edm::ActivityRegistry::watchPostModuleEvent(), edm::ActivityRegistry::watchPostModuleEventAcquire(), edm::ActivityRegistry::watchPostModuleGlobalBeginLumi(), edm::ActivityRegistry::watchPostModuleGlobalBeginRun(), edm::ActivityRegistry::watchPostModuleGlobalEndLumi(), edm::ActivityRegistry::watchPostModuleGlobalEndRun(), edm::ActivityRegistry::watchPostModuleStreamBeginLumi(), edm::ActivityRegistry::watchPostModuleStreamBeginRun(), edm::ActivityRegistry::watchPostModuleStreamEndLumi(), edm::ActivityRegistry::watchPostModuleStreamEndRun(), edm::ActivityRegistry::watchPostSourceEvent(), edm::ActivityRegistry::watchPostSourceLumi(), edm::ActivityRegistry::watchPostSourceRun(), edm::ActivityRegistry::watchPreESSyncIOV(), edm::ActivityRegistry::watchPreEventReadFromSource(), edm::ActivityRegistry::watchPreModuleEvent(), edm::ActivityRegistry::watchPreModuleEventAcquire(), edm::ActivityRegistry::watchPreModuleGlobalBeginLumi(), edm::ActivityRegistry::watchPreModuleGlobalBeginRun(), edm::ActivityRegistry::watchPreModuleGlobalEndLumi(), edm::ActivityRegistry::watchPreModuleGlobalEndRun(), edm::ActivityRegistry::watchPreModuleStreamBeginLumi(), edm::ActivityRegistry::watchPreModuleStreamBeginRun(), edm::ActivityRegistry::watchPreModuleStreamEndLumi(), edm::ActivityRegistry::watchPreModuleStreamEndRun(), edm::ActivityRegistry::watchPreSourceEvent(), edm::ActivityRegistry::watchPreSourceLumi(), and edm::ActivityRegistry::watchPreSourceRun().

375  {
376  iRegistry.watchPreSourceEvent([this](auto) { addTask(); });
377  iRegistry.watchPostSourceEvent([this](auto) { removeTask(); });
378 
379  iRegistry.watchPreModuleEvent([this](auto, auto) { addTask(); });
380  iRegistry.watchPostModuleEvent([this](auto, auto) { removeTask(); });
381  iRegistry.watchPreModuleEventAcquire([this](auto, auto) { addTask(); });
382  iRegistry.watchPostModuleEventAcquire([this](auto, auto) { removeTask(); });
383 
384  iRegistry.watchPreSourceLumi([this](auto) { addTask(); });
385  iRegistry.watchPostSourceLumi([this](auto) { removeTask(); });
386 
387  iRegistry.watchPreSourceRun([this](auto) { addTask(); });
388  iRegistry.watchPostSourceRun([this](auto) { removeTask(); });
389 
390  iRegistry.watchPreEventReadFromSource([this](auto, auto) { addTask(); });
391  iRegistry.watchPostEventReadFromSource([this](auto, auto) { removeTask(); });
392 
393  iRegistry.watchPreModuleStreamBeginRun([this](auto, auto) { addTask(); });
394  iRegistry.watchPostModuleStreamBeginRun([this](auto, auto) { removeTask(); });
395  iRegistry.watchPreModuleStreamEndRun([this](auto, auto) { addTask(); });
396  iRegistry.watchPostModuleStreamEndRun([this](auto, auto) { removeTask(); });
397 
398  iRegistry.watchPreModuleStreamBeginLumi([this](auto, auto) { addTask(); });
399  iRegistry.watchPostModuleStreamBeginLumi([this](auto, auto) { removeTask(); });
400  iRegistry.watchPreModuleStreamEndLumi([this](auto, auto) { addTask(); });
401  iRegistry.watchPostModuleStreamEndLumi([this](auto, auto) { removeTask(); });
402 
403  iRegistry.watchPreModuleGlobalBeginRun([this](auto, auto) { addTask(); });
404  iRegistry.watchPostModuleGlobalBeginRun([this](auto, auto) { removeTask(); });
405  iRegistry.watchPreModuleGlobalEndRun([this](auto, auto) { addTask(); });
406  iRegistry.watchPostModuleGlobalEndRun([this](auto, auto) { removeTask(); });
407 
408  iRegistry.watchPreModuleGlobalBeginLumi([this](auto, auto) { addTask(); });
409  iRegistry.watchPostModuleGlobalBeginLumi([this](auto, auto) { removeTask(); });
410  iRegistry.watchPreModuleGlobalEndLumi([this](auto, auto) { addTask(); });
411  iRegistry.watchPostModuleGlobalEndLumi([this](auto, auto) { removeTask(); });
412 
413  //account for any time ESSources spend looking up new IOVs
414  iRegistry.watchPreESSyncIOV([this](auto const&) { addTask(); });
415  iRegistry.watchPostESSyncIOV([this](auto const&) { removeTask(); });
416  }

Member Data Documentation

◆ accumulatedEventSetupModuleTimings_

std::atomic<double> edm::service::Timing::accumulatedEventSetupModuleTimings_ = 0.
private

Definition at line 134 of file Timing.cc.

Referenced by postEndJob().

◆ begin_lumi_count_

std::atomic<unsigned long> edm::service::Timing::begin_lumi_count_
private

Definition at line 127 of file Timing.cc.

Referenced by postEndJob(), and postGlobalBeginLumi().

◆ begin_run_count_

std::atomic<unsigned long> edm::service::Timing::begin_run_count_
private

Definition at line 128 of file Timing.cc.

Referenced by postEndJob(), and postGlobalBeginRun().

◆ configuredInTopLevelProcess_

bool edm::service::Timing::configuredInTopLevelProcess_
private

◆ countSubProcessesPostEvent_

std::vector<std::unique_ptr<std::atomic<unsigned int> > > edm::service::Timing::countSubProcessesPostEvent_
private

Definition at line 137 of file Timing.cc.

Referenced by postEvent().

◆ countSubProcessesPreEvent_

std::vector<std::unique_ptr<std::atomic<unsigned int> > > edm::service::Timing::countSubProcessesPreEvent_
private

Definition at line 136 of file Timing.cc.

Referenced by preEvent().

◆ curr_events_time_

std::vector<time_point> edm::service::Timing::curr_events_time_
private

Definition at line 111 of file Timing.cc.

Referenced by postEvent(), and preEvent().

◆ curr_job_cpu_

double edm::service::Timing::curr_job_cpu_
private

Definition at line 106 of file Timing.cc.

Referenced by beginProcessing(), and postEndJob().

◆ curr_job_time_

time_point edm::service::Timing::curr_job_time_
private

Definition at line 105 of file Timing.cc.

Referenced by beginProcessing(), and postEndJob().

◆ end_loop_cpu_

std::atomic<double> edm::service::Timing::end_loop_cpu_
private

Definition at line 110 of file Timing.cc.

Referenced by postEndJob().

◆ end_loop_time_

std::atomic<time_point> edm::service::Timing::end_loop_time_
private

Definition at line 109 of file Timing.cc.

Referenced by postEndJob().

◆ eventSetupModuleCallInfo_

std::vector<std::pair<uintptr_t, eventsetup::EventSetupRecordKey> > edm::service::Timing::eventSetupModuleCallInfo_
private

Definition at line 133 of file Timing.cc.

◆ eventSetupModuleStartTimes_

std::vector<std::unique_ptr<std::atomic<time_point> > > edm::service::Timing::eventSetupModuleStartTimes_
private

Definition at line 132 of file Timing.cc.

◆ extra_job_cpu_

std::atomic<double> edm::service::Timing::extra_job_cpu_
private

Definition at line 107 of file Timing.cc.

Referenced by addToCPUTime(), and postEndJob().

◆ last_task_change_time_

time_point edm::service::Timing::last_task_change_time_ = time_point()
private

Definition at line 118 of file Timing.cc.

Referenced by beginProcessing(), and runningTasksChanged().

◆ max_events_time_

std::vector<double> edm::service::Timing::max_events_time_
private

Definition at line 123 of file Timing.cc.

Referenced by lastPostEvent(), and postEndJob().

◆ min_events_time_

std::vector<double> edm::service::Timing::min_events_time_
private

Definition at line 124 of file Timing.cc.

Referenced by lastPostEvent(), and postEndJob().

◆ nStreams_

unsigned int edm::service::Timing::nStreams_
private

Definition at line 129 of file Timing.cc.

Referenced by postEndJob().

◆ nSubProcesses_

unsigned int edm::service::Timing::nSubProcesses_
private

Definition at line 140 of file Timing.cc.

Referenced by postEvent(), preBeginJob(), and preEvent().

◆ nThreads_

unsigned int edm::service::Timing::nThreads_
private

Definition at line 130 of file Timing.cc.

Referenced by postEndJob(), and runningTasksChanged().

◆ num_running_tasks_

unsigned int edm::service::Timing::num_running_tasks_ = 0
private

Definition at line 117 of file Timing.cc.

Referenced by runningTasksChanged().

◆ report_summary_

bool edm::service::Timing::report_summary_
private

Definition at line 113 of file Timing.cc.

Referenced by postEndJob().

◆ sum_events_time_

std::vector<double> edm::service::Timing::sum_events_time_
private

Definition at line 125 of file Timing.cc.

Referenced by lastPostEvent(), and postEndJob().

◆ summary_only_

bool edm::service::Timing::summary_only_
private

Definition at line 112 of file Timing.cc.

Referenced by beginProcessing(), lastPostEvent(), and postModuleEvent().

◆ threshold_

double edm::service::Timing::threshold_
private

Definition at line 114 of file Timing.cc.

Referenced by postCommon().

◆ total_event_count_

std::atomic<unsigned long> edm::service::Timing::total_event_count_
private

Definition at line 126 of file Timing.cc.

Referenced by lastPostEvent(), and postEndJob().

◆ total_time_without_tasks_

double edm::service::Timing::total_time_without_tasks_ = 0
private

Definition at line 119 of file Timing.cc.

Referenced by postEndJob(), and runningTasksChanged().

◆ updating_task_info_

std::atomic<bool> edm::service::Timing::updating_task_info_ = false
private

Definition at line 116 of file Timing.cc.

Referenced by runningTasksChanged().