CMS 3D CMS Logo

List of all members | 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 Member Functions

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

Static Public Member Functions

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

Private Member Functions

void postBeginJob ()
 
double postCommon () const
 
void postEndJob ()
 
void postEvent (StreamContext 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 ()
 
void postSourceRun ()
 
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 &, bool)
 
void preSourceEvent (StreamID)
 
void preSourceLumi ()
 
void preSourceRun ()
 

Private Attributes

std::vector< double > curr_events_time_
 
double curr_job_cpu_
 
double curr_job_time_
 
std::atomic< double > extra_job_cpu_
 
std::atomic< double > last_run_cpu_
 
std::atomic< double > last_run_time_
 
std::vector< double > max_events_time_
 
std::vector< double > min_events_time_
 
unsigned int nStreams_
 
unsigned int nThreads_
 
bool report_summary_
 
std::vector< double > sum_events_time_
 
bool summary_only_
 
double threshold_
 
std::atomic< unsigned long > total_event_count_
 

Detailed Description

Definition at line 36 of file Timing.cc.

Constructor & Destructor Documentation

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

Definition at line 168 of file Timing.cc.

References edm::signalslot::Signal< T >::connect(), curr_events_time_, edm::service::getCPU(), edm::service::getTime(), last_run_cpu_, last_run_time_, SiStripPI::max, max_events_time_, edm::service::SystemBounds::maxNumberOfStreams(), edm::service::SystemBounds::maxNumberOfThreads(), min_events_time_, nStreams_, nThreads_, postBeginJob(), postEndJob(), postEvent(), edm::ActivityRegistry::postGlobalEndRunSignal_, postModule(), postModuleEvent(), postModuleGlobal(), postModuleStream(), postOpenFile(), postSourceEvent(), postSourceLumi(), postSourceRun(), edm::ActivityRegistry::preallocateSignal_, preEvent(), preModule(), preModuleGlobal(), preModuleStream(), preOpenFile(), preSourceEvent(), preSourceLumi(), preSourceRun(), sum_events_time_, summary_only_, threshold_, edm::ActivityRegistry::watchPostBeginJob(), edm::ActivityRegistry::watchPostEndJob(), edm::ActivityRegistry::watchPostEvent(), edm::ActivityRegistry::watchPostEventReadFromSource(), edm::ActivityRegistry::watchPostModuleBeginJob(), edm::ActivityRegistry::watchPostModuleConstruction(), edm::ActivityRegistry::watchPostModuleEndJob(), edm::ActivityRegistry::watchPostModuleEvent(), 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::watchPostOpenFile(), edm::ActivityRegistry::watchPostSourceConstruction(), edm::ActivityRegistry::watchPostSourceEvent(), edm::ActivityRegistry::watchPostSourceLumi(), edm::ActivityRegistry::watchPostSourceRun(), edm::ActivityRegistry::watchPreEvent(), edm::ActivityRegistry::watchPreEventReadFromSource(), edm::ActivityRegistry::watchPreModuleBeginJob(), edm::ActivityRegistry::watchPreModuleConstruction(), edm::ActivityRegistry::watchPreModuleEndJob(), edm::ActivityRegistry::watchPreModuleEvent(), 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::watchPreOpenFile(), edm::ActivityRegistry::watchPreSourceConstruction(), edm::ActivityRegistry::watchPreSourceEvent(), edm::ActivityRegistry::watchPreSourceLumi(), and edm::ActivityRegistry::watchPreSourceRun().

168  :
169  curr_job_time_(0.),
170  curr_job_cpu_(0.),
171  extra_job_cpu_(0.0),
172  last_run_time_(0.0),
173  last_run_cpu_(0.0),
175  summary_only_(iPS.getUntrackedParameter<bool>("summaryOnly")),
176  report_summary_(iPS.getUntrackedParameter<bool>("useJobReport")),
177  threshold_(iPS.getUntrackedParameter<double>("excessiveTimeThreshold")),
180  total_event_count_(0) {
181  iRegistry.watchPostBeginJob(this, &Timing::postBeginJob);
182  iRegistry.watchPostEndJob(this, &Timing::postEndJob);
183 
184  iRegistry.watchPreEvent(this, &Timing::preEvent);
185  iRegistry.watchPostEvent(this, &Timing::postEvent);
186 
187  bool checkThreshold = true;
188  if (threshold_ <= 0.0) {
189  //we need to ignore the threshold check
191  checkThreshold = false;
192  }
193 
194  if( (not summary_only_) || (checkThreshold) ) {
195  iRegistry.watchPreModuleEvent(this, &Timing::preModuleStream);
196  iRegistry.watchPostModuleEvent(this, &Timing::postModuleEvent);
197  }
198  if(checkThreshold) {
199  iRegistry.watchPreSourceEvent(this, &Timing::preSourceEvent);
200  iRegistry.watchPostSourceEvent(this, &Timing::postSourceEvent);
201 
202  iRegistry.watchPreSourceLumi(this, &Timing::preSourceLumi);
203  iRegistry.watchPostSourceLumi(this, &Timing::postSourceLumi);
204 
205  iRegistry.watchPreSourceRun(this, &Timing::preSourceRun);
206  iRegistry.watchPostSourceRun(this, &Timing::postSourceRun);
207 
208  iRegistry.watchPreOpenFile(this, &Timing::preOpenFile);
209  iRegistry.watchPostOpenFile(this, &Timing::postOpenFile);
210 
211  iRegistry.watchPreEventReadFromSource(this, &Timing::preModuleStream);
212  iRegistry.watchPostEventReadFromSource(this, &Timing::postModuleStream);
213 
214  iRegistry.watchPreModuleConstruction(this, &Timing::preModule);
215  iRegistry.watchPostModuleConstruction(this, &Timing::postModule);
216 
217  iRegistry.watchPreModuleBeginJob(this, &Timing::preModule);
218  iRegistry.watchPostModuleBeginJob(this, &Timing::postModule);
219 
220  iRegistry.watchPreModuleEndJob(this, &Timing::preModule);
221  iRegistry.watchPostModuleEndJob(this, &Timing::postModule);
222 
223  iRegistry.watchPreModuleStreamBeginRun(this, &Timing::preModuleStream);
224  iRegistry.watchPostModuleStreamBeginRun(this, &Timing::postModuleStream);
225  iRegistry.watchPreModuleStreamEndRun(this, &Timing::preModuleStream);
226  iRegistry.watchPostModuleStreamEndRun(this, &Timing::postModuleStream);
227 
228  iRegistry.watchPreModuleStreamBeginLumi(this, &Timing::preModuleStream);
229  iRegistry.watchPostModuleStreamBeginLumi(this, &Timing::postModuleStream);
230  iRegistry.watchPreModuleStreamEndLumi(this, &Timing::preModuleStream);
231  iRegistry.watchPostModuleStreamEndLumi(this, &Timing::postModuleStream);
232 
233  iRegistry.watchPreModuleGlobalBeginRun(this, &Timing::preModuleGlobal);
234  iRegistry.watchPostModuleGlobalBeginRun(this, &Timing::postModuleGlobal);
235  iRegistry.watchPreModuleGlobalEndRun(this, &Timing::preModuleGlobal);
236  iRegistry.watchPostModuleGlobalEndRun(this, &Timing::postModuleGlobal);
237 
238  iRegistry.watchPreModuleGlobalBeginLumi(this, &Timing::preModuleGlobal);
239  iRegistry.watchPostModuleGlobalBeginLumi(this, &Timing::postModuleGlobal);
240  iRegistry.watchPreModuleGlobalEndLumi(this, &Timing::preModuleGlobal);
241  iRegistry.watchPostModuleGlobalEndLumi(this, &Timing::postModuleGlobal);
242 
243  iRegistry.watchPreSourceConstruction(this, &Timing::preModule);
244  iRegistry.watchPostSourceConstruction(this, &Timing::postModule);
245  }
246 
247  iRegistry.preallocateSignal_.connect([this](service::SystemBounds const& iBounds){
248  nStreams_ = iBounds.maxNumberOfStreams();
249  nThreads_ = iBounds.maxNumberOfThreads();
250  curr_events_time_.resize(nStreams_,0.);
251  sum_events_time_.resize(nStreams_,0.);
252  max_events_time_.resize(nStreams_,0.);
253  min_events_time_.resize(nStreams_,1.E6);
254 
255  });
256 
257  iRegistry.postGlobalEndRunSignal_.connect([this](edm::GlobalContext const&) {
259  last_run_cpu_ = getCPU();
260  });
261  }
std::vector< double > sum_events_time_
Definition: Timing.cc:94
double curr_job_time_
Definition: Timing.cc:79
std::atomic< double > last_run_cpu_
Definition: Timing.cc:84
std::vector< double > max_events_time_
Definition: Timing.cc:92
std::vector< double > curr_events_time_
Definition: Timing.cc:85
void preModule(ModuleDescription const &md)
Definition: Timing.cc:456
static double getCPU()
Definition: Timing.cc:125
void postEvent(StreamContext const &)
Definition: Timing.cc:390
void preModuleStream(StreamContext const &, ModuleCallingContext const &)
Definition: Timing.cc:476
double curr_job_cpu_
Definition: Timing.cc:80
unsigned int nThreads_
Definition: Timing.cc:97
void preOpenFile(std::string const &, bool)
Definition: Timing.cc:447
unsigned int nStreams_
Definition: Timing.cc:96
void preModuleGlobal(GlobalContext const &, ModuleCallingContext const &)
Definition: Timing.cc:466
void postModule(ModuleDescription const &md)
Definition: Timing.cc:461
void postModuleStream(StreamContext const &, ModuleCallingContext const &)
Definition: Timing.cc:481
void postModuleEvent(StreamContext const &, ModuleCallingContext const &)
Definition: Timing.cc:409
std::atomic< double > last_run_time_
Definition: Timing.cc:83
void preSourceLumi()
Definition: Timing.cc:431
void postSourceRun()
Definition: Timing.cc:443
std::atomic< unsigned long > total_event_count_
Definition: Timing.cc:95
void postSourceLumi()
Definition: Timing.cc:435
void postModuleGlobal(GlobalContext const &, ModuleCallingContext const &)
Definition: Timing.cc:471
void postOpenFile(std::string const &, bool)
Definition: Timing.cc:451
static double getTime()
Definition: Timing.cc:118
void postSourceEvent(StreamID)
Definition: Timing.cc:427
std::atomic< double > extra_job_cpu_
Definition: Timing.cc:81
void preSourceEvent(StreamID)
Definition: Timing.cc:423
void preEvent(StreamContext const &)
Definition: Timing.cc:385
std::vector< double > min_events_time_
Definition: Timing.cc:93
edm::service::Timing::~Timing ( )
override

Definition at line 263 of file Timing.cc.

263  {
264  }

Member Function Documentation

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 266 of file Timing.cc.

References extra_job_cpu_.

266  {
267  //For accounting purposes we effectively can say we started earlier
268  double expected = extra_job_cpu_.load();
269  while( not extra_job_cpu_.compare_exchange_strong(expected,expected+iTime) ) {}
270  }
std::atomic< double > extra_job_cpu_
Definition: Timing.cc:81
void edm::service::Timing::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 276 of file Timing.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::addUntracked(), edm::ConfigurationDescriptions::setComment(), and edm::ParameterDescriptionNode::setComment().

276  {
278  desc.addUntracked<bool>("summaryOnly", false)->setComment(
279  "If 'true' do not report timing for each event");
280  desc.addUntracked<bool>("useJobReport", true)->setComment(
281  "If 'true' write summary information to JobReport");
282  desc.addUntracked<double>("excessiveTimeThreshold", 0.)->setComment(
283  "Amount of time in seconds before reporting a module or source has taken excessive time. A value of 0.0 turns off this reporting.");
284  descriptions.add("Timing", desc);
285  descriptions.setComment(
286  "This service reports the time it takes to run each module in a job.");
287  }
void setComment(std::string const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
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 272 of file Timing.cc.

References edm::service::getCPU().

272  {
273  return getCPU();
274  }
static double getCPU()
Definition: Timing.cc:125
void edm::service::Timing::postBeginJob ( )
private

Definition at line 289 of file Timing.cc.

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

Referenced by Timing().

289  {
291  curr_job_cpu_ = getCPU();
292 
293  if(not summary_only_) {
294  LogImportant("TimeReport")
295  << "TimeReport> Report activated" << "\n"
296  << "TimeReport> Report columns headings for events: "
297  << "eventnum runnum timetaken\n"
298  << "TimeReport> Report columns headings for modules: "
299  << "eventnum runnum modulelabel modulename timetakeni\n"
300  << "TimeReport> JobTime=" << curr_job_time_ << " JobCPU=" << curr_job_cpu_ << "\n";
301  }
302  }
double curr_job_time_
Definition: Timing.cc:79
static double getCPU()
Definition: Timing.cc:125
double curr_job_cpu_
Definition: Timing.cc:80
static double getTime()
Definition: Timing.cc:118
double edm::service::Timing::postCommon ( ) const
private

Definition at line 486 of file Timing.cc.

References edm::service::popStack(), lumiQTWidget::t, threshold_, and trackingPlots::Timing.

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

486  {
487  double t = popStack();
488  if(t > threshold_) {
489  LogError("ExcessiveTime")
490  << "ExcessiveTime: Module used " << t
491  << " seconds of time which exceeds the error threshold configured in the Timing Service of "
492  << threshold_ << " seconds.";
493  }
494  return t;
495  }
static double popStack()
Definition: Timing.cc:153
void edm::service::Timing::postEndJob ( )
private

Definition at line 304 of file Timing.cc.

References 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_, lumiQTWidget::t, total_event_count_, and edm::service::ui2str().

Referenced by Timing().

304  {
305  const double job_end_time =getTime();
306  const double job_end_cpu =getCPU();
307  double total_job_time = job_end_time - jobStartTime();
308 
309  double total_job_cpu = job_end_cpu+extra_job_cpu_;
310 
311  const double total_initialization_time = curr_job_time_ - jobStartTime();
312  const double total_initialization_cpu = curr_job_cpu_;
313 
314  if( 0.0 == jobStartTime()) {
315  //did not capture beginning time
316  total_job_time =job_end_time - curr_job_time_;
317  total_job_cpu =job_end_cpu + extra_job_cpu_ - curr_job_cpu_ ;
318  }
319 
320  double min_event_time = *(std::min_element(min_events_time_.begin(),
321  min_events_time_.end()));
322  double max_event_time = *(std::max_element(max_events_time_.begin(),
323  max_events_time_.end()));
324 
325  auto total_loop_time = last_run_time_ - curr_job_time_;
326  auto total_loop_cpu = last_run_cpu_ + extra_job_cpu_ - curr_job_cpu_;
327 
328  if(last_run_time_ == 0.0) {
329  total_loop_time = 0.0;
330  total_loop_cpu = 0.0;
331  }
332 
333  double sum_all_events_time = 0;
334  for(auto t : sum_events_time_) { sum_all_events_time += t; }
335 
336  double average_event_time = 0.0;
337  if(total_event_count_ != 0) {
338  average_event_time = sum_all_events_time / total_event_count_;
339  }
340 
341  double event_throughput = 0.0;
342  if(total_loop_time != 0.0) {
343  event_throughput = total_event_count_ / total_loop_time;
344  }
345 
346  LogImportant("TimeReport")
347  << "TimeReport> Time report complete in "
348  << total_job_time << " seconds"
349  << "\n"
350  << " Time Summary: \n"
351  << " - Min event: " << min_event_time << "\n"
352  << " - Max event: " << max_event_time << "\n"
353  << " - Avg event: " << average_event_time << "\n"
354  << " - Total loop: " << total_loop_time <<"\n"
355  << " - Total init: " << total_initialization_time <<"\n"
356  << " - Total job: " << total_job_time << "\n"
357  << " Event Throughput: "<< event_throughput <<" ev/s\n"
358  << " CPU Summary: \n"
359  << " - Total loop: " << total_loop_cpu << "\n"
360  << " - Total init: " << total_initialization_cpu <<"\n"
361  << " - Total extra: " << extra_job_cpu_ << "\n"
362  << " - Total job: " << total_job_cpu << "\n";
363 
364 
365  if(report_summary_) {
366  Service<JobReport> reportSvc;
367  std::map<std::string, std::string> reportData;
368 
369  reportData.insert(std::make_pair("MinEventTime", d2str(min_event_time)));
370  reportData.insert(std::make_pair("MaxEventTime", d2str(max_event_time)));
371  reportData.insert(std::make_pair("AvgEventTime", d2str(average_event_time)));
372  reportData.insert(std::make_pair("EventThroughput", d2str(event_throughput)));
373  reportData.insert(std::make_pair("TotalJobTime", d2str(total_job_time)));
374  reportData.insert(std::make_pair("TotalJobCPU", d2str(total_job_cpu)));
375  reportData.insert(std::make_pair("TotalLoopTime", d2str(total_loop_time)));
376  reportData.insert(std::make_pair("TotalLoopCPU", d2str(total_loop_cpu)));
377  reportData.insert(std::make_pair("TotalInitTime", d2str(total_initialization_time)));
378  reportData.insert(std::make_pair("TotalInitCPU", d2str(total_initialization_cpu)));
379  reportData.insert(std::make_pair("NumberOfStreams",ui2str(nStreams_)));
380  reportData.insert(std::make_pair("NumberOfThreads",ui2str(nThreads_)));
381  reportSvc->reportPerformanceSummary("Timing", reportData);
382  }
383  }
std::vector< double > sum_events_time_
Definition: Timing.cc:94
double curr_job_time_
Definition: Timing.cc:79
std::atomic< double > last_run_cpu_
Definition: Timing.cc:84
std::vector< double > max_events_time_
Definition: Timing.cc:92
static double getCPU()
Definition: Timing.cc:125
double curr_job_cpu_
Definition: Timing.cc:80
unsigned int nThreads_
Definition: Timing.cc:97
unsigned int nStreams_
Definition: Timing.cc:96
std::atomic< double > last_run_time_
Definition: Timing.cc:83
static double jobStartTime()
static std::string ui2str(unsigned int i)
Definition: Timing.cc:111
std::atomic< unsigned long > total_event_count_
Definition: Timing.cc:95
static std::string d2str(double d)
static double getTime()
Definition: Timing.cc:118
std::atomic< double > extra_job_cpu_
Definition: Timing.cc:81
std::vector< double > min_events_time_
Definition: Timing.cc:93
void edm::service::Timing::postEvent ( StreamContext const &  iStream)
private

Definition at line 390 of file Timing.cc.

References curr_events_time_, edm::StreamContext::eventID(), edm::service::getTime(), diffTreeTool::index, max_events_time_, min_events_time_, edm::StreamContext::streamID(), sum_events_time_, summary_only_, total_event_count_, and edm::StreamID::value().

Referenced by Timing().

390  {
391  auto index = iStream.streamID().value();
392 
393  double curr_event_time = getTime() - curr_events_time_[index];
394  sum_events_time_[index] +=curr_event_time;
395 
396  if(not summary_only_) {
397  auto const & eventID = iStream.eventID();
398  LogPrint("TimeEvent")
399  << "TimeEvent> "
400  << eventID.event() << " "
401  << eventID.run() << " "
402  << curr_event_time ;
403  }
404  if(curr_event_time > max_events_time_[index]) max_events_time_[index] = curr_event_time;
405  if(curr_event_time < min_events_time_[index]) min_events_time_[index] = curr_event_time;
407  }
std::vector< double > sum_events_time_
Definition: Timing.cc:94
std::vector< double > max_events_time_
Definition: Timing.cc:92
std::vector< double > curr_events_time_
Definition: Timing.cc:85
std::atomic< unsigned long > total_event_count_
Definition: Timing.cc:95
static double getTime()
Definition: Timing.cc:118
std::vector< double > min_events_time_
Definition: Timing.cc:93
void edm::service::Timing::postModule ( ModuleDescription const &  md)
private

Definition at line 461 of file Timing.cc.

References postCommon().

Referenced by Timing().

461  {
462  postCommon();
463  }
double postCommon() const
Definition: Timing.cc:486
void edm::service::Timing::postModuleEvent ( StreamContext const &  iStream,
ModuleCallingContext const &  iModule 
)
private

Definition at line 409 of file Timing.cc.

References edm::StreamContext::eventID(), edm::ModuleCallingContext::moduleDescription(), postCommon(), summary_only_, and lumiQTWidget::t.

Referenced by Timing().

409  {
410  auto const & eventID = iStream.eventID();
411  auto const & desc = *(iModule.moduleDescription());
412  double t = postCommon();
413  if ( not summary_only_) {
414  LogPrint("TimeModule") << "TimeModule> "
415  << eventID.event() << " "
416  << eventID.run() << " "
417  << desc.moduleLabel() << " "
418  << desc.moduleName() << " "
419  << t;
420  }
421  }
double postCommon() const
Definition: Timing.cc:486
void edm::service::Timing::postModuleGlobal ( GlobalContext const &  ,
ModuleCallingContext const &  mcc 
)
private

Definition at line 471 of file Timing.cc.

References postCommon().

Referenced by Timing().

471  {
472  postCommon();
473  }
double postCommon() const
Definition: Timing.cc:486
void edm::service::Timing::postModuleStream ( StreamContext const &  ,
ModuleCallingContext const &  mcc 
)
private

Definition at line 481 of file Timing.cc.

References postCommon().

Referenced by Timing().

481  {
482  postCommon();
483  }
double postCommon() const
Definition: Timing.cc:486
void edm::service::Timing::postOpenFile ( std::string const &  lfn,
bool  b 
)
private

Definition at line 451 of file Timing.cc.

References postCommon().

Referenced by Timing().

451  {
452  postCommon();
453  }
double postCommon() const
Definition: Timing.cc:486
void edm::service::Timing::postSourceEvent ( StreamID  sid)
private

Definition at line 427 of file Timing.cc.

References postCommon().

Referenced by Timing().

427  {
428  postCommon();
429  }
double postCommon() const
Definition: Timing.cc:486
void edm::service::Timing::postSourceLumi ( )
private

Definition at line 435 of file Timing.cc.

References postCommon().

Referenced by Timing().

435  {
436  postCommon();
437  }
double postCommon() const
Definition: Timing.cc:486
void edm::service::Timing::postSourceRun ( )
private

Definition at line 443 of file Timing.cc.

References postCommon().

Referenced by Timing().

443  {
444  postCommon();
445  }
double postCommon() const
Definition: Timing.cc:486
void edm::service::Timing::preEvent ( StreamContext const &  iStream)
private

Definition at line 385 of file Timing.cc.

References curr_events_time_, edm::service::getTime(), diffTreeTool::index, edm::StreamContext::streamID(), and edm::StreamID::value().

Referenced by Timing().

385  {
386  auto index = iStream.streamID().value();
388  }
std::vector< double > curr_events_time_
Definition: Timing.cc:85
static double getTime()
Definition: Timing.cc:118
void edm::service::Timing::preModule ( ModuleDescription const &  md)
private

Definition at line 456 of file Timing.cc.

References edm::service::pushStack().

Referenced by Timing().

456  {
457  pushStack();
458  }
static void pushStack()
Definition: Timing.cc:163
void edm::service::Timing::preModuleGlobal ( GlobalContext const &  ,
ModuleCallingContext const &   
)
private

Definition at line 466 of file Timing.cc.

References edm::service::pushStack().

Referenced by Timing().

466  {
467  pushStack();
468  }
static void pushStack()
Definition: Timing.cc:163
void edm::service::Timing::preModuleStream ( StreamContext const &  ,
ModuleCallingContext const &   
)
private

Definition at line 476 of file Timing.cc.

References edm::service::pushStack().

Referenced by Timing().

476  {
477  pushStack();
478  }
static void pushStack()
Definition: Timing.cc:163
void edm::service::Timing::preOpenFile ( std::string const &  lfn,
bool  b 
)
private

Definition at line 447 of file Timing.cc.

References edm::service::pushStack().

Referenced by Timing().

447  {
448  pushStack();
449  }
static void pushStack()
Definition: Timing.cc:163
void edm::service::Timing::preSourceEvent ( StreamID  sid)
private

Definition at line 423 of file Timing.cc.

References edm::service::pushStack().

Referenced by Timing().

423  {
424  pushStack();
425  }
static void pushStack()
Definition: Timing.cc:163
void edm::service::Timing::preSourceLumi ( )
private

Definition at line 431 of file Timing.cc.

References edm::service::pushStack().

Referenced by Timing().

431  {
432  pushStack();
433  }
static void pushStack()
Definition: Timing.cc:163
void edm::service::Timing::preSourceRun ( )
private

Definition at line 439 of file Timing.cc.

References edm::service::pushStack().

Referenced by Timing().

439  {
440  pushStack();
441  }
static void pushStack()
Definition: Timing.cc:163

Member Data Documentation

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

Definition at line 85 of file Timing.cc.

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

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

Definition at line 80 of file Timing.cc.

Referenced by postBeginJob(), and postEndJob().

double edm::service::Timing::curr_job_time_
private

Definition at line 79 of file Timing.cc.

Referenced by postBeginJob(), and postEndJob().

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

Definition at line 81 of file Timing.cc.

Referenced by addToCPUTime(), and postEndJob().

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

Definition at line 84 of file Timing.cc.

Referenced by postEndJob(), and Timing().

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

Definition at line 83 of file Timing.cc.

Referenced by postEndJob(), and Timing().

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

Definition at line 92 of file Timing.cc.

Referenced by postEndJob(), postEvent(), and Timing().

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

Definition at line 93 of file Timing.cc.

Referenced by postEndJob(), postEvent(), and Timing().

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

Definition at line 96 of file Timing.cc.

Referenced by postEndJob(), and Timing().

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

Definition at line 97 of file Timing.cc.

Referenced by postEndJob(), and Timing().

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

Definition at line 87 of file Timing.cc.

Referenced by postEndJob().

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

Definition at line 94 of file Timing.cc.

Referenced by postEndJob(), postEvent(), and Timing().

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

Definition at line 86 of file Timing.cc.

Referenced by postBeginJob(), postEvent(), postModuleEvent(), and Timing().

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

Definition at line 88 of file Timing.cc.

Referenced by postCommon(), and Timing().

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

Definition at line 95 of file Timing.cc.

Referenced by postEndJob(), and postEvent().