CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Static Private Attributes
edm::TimingServiceBase Class Referenceabstract

#include <TimingServiceBase.h>

Inheritance diagram for edm::TimingServiceBase:
edm::service::Timing

Public Member Functions

virtual void addToCPUTime (double iTime)=0
 
virtual double getTotalCPU () const =0
 
const TimingServiceBaseoperator= (const TimingServiceBase &)=delete
 
 TimingServiceBase ()
 
 TimingServiceBase (const TimingServiceBase &)=delete
 
virtual ~TimingServiceBase ()
 

Static Public Member Functions

static void jobStarted ()
 
static double jobStartTime ()
 

Static Private Attributes

static double s_jobStartTime = 0.0
 

Detailed Description

Definition at line 28 of file TimingServiceBase.h.

Constructor & Destructor Documentation

◆ TimingServiceBase() [1/2]

TimingServiceBase::TimingServiceBase ( )

Definition at line 39 of file TimingServiceBase.cc.

39 {}

◆ TimingServiceBase() [2/2]

edm::TimingServiceBase::TimingServiceBase ( const TimingServiceBase )
delete

◆ ~TimingServiceBase()

TimingServiceBase::~TimingServiceBase ( )
virtual

Definition at line 41 of file TimingServiceBase.cc.

41 {}

Member Function Documentation

◆ addToCPUTime()

virtual void edm::TimingServiceBase::addToCPUTime ( double  iTime)
pure virtual

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

Implemented in edm::service::Timing.

◆ getTotalCPU()

virtual double edm::TimingServiceBase::getTotalCPU ( ) const
pure virtual

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

Implemented in edm::service::Timing.

Referenced by edm::service::CondorStatusService::updateImpl().

◆ jobStarted()

void TimingServiceBase::jobStarted ( )
static

Definition at line 26 of file TimingServiceBase.cc.

26  {
27  if (0.0 == s_jobStartTime) {
28  struct timeval t;
29  if (gettimeofday(&t, nullptr) < 0) {
30  return;
31  }
32  s_jobStartTime = static_cast<double>(t.tv_sec) + (static_cast<double>(t.tv_usec) * 1E-6);
33  }
34 }

References s_jobStartTime, and submitPVValidationJobs::t.

◆ jobStartTime()

static double edm::TimingServiceBase::jobStartTime ( )
inlinestatic

Definition at line 47 of file TimingServiceBase.h.

47 { return s_jobStartTime; }

References s_jobStartTime.

Referenced by edm::service::Timing::postEndJob().

◆ operator=()

const TimingServiceBase& edm::TimingServiceBase::operator= ( const TimingServiceBase )
delete

Member Data Documentation

◆ s_jobStartTime

double TimingServiceBase::s_jobStartTime = 0.0
staticprivate

Definition at line 50 of file TimingServiceBase.h.

Referenced by jobStarted(), and jobStartTime().

edm::TimingServiceBase::s_jobStartTime
static double s_jobStartTime
Definition: TimingServiceBase.h:50
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644