CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private 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
 
 TimingServiceBase ()
 
virtual ~TimingServiceBase ()
 

Static Public Member Functions

static void jobStarted ()
 
static double jobStartTime ()
 

Private Member Functions

const TimingServiceBaseoperator= (const TimingServiceBase &)=delete
 
 TimingServiceBase (const TimingServiceBase &)=delete
 

Static Private Attributes

static double s_jobStartTime = 0.0
 

Detailed Description

Definition at line 28 of file TimingServiceBase.h.

Constructor & Destructor Documentation

TimingServiceBase::TimingServiceBase ( )

Definition at line 39 of file TimingServiceBase.cc.

Referenced by jobStartTime().

39 {}
TimingServiceBase::~TimingServiceBase ( )
virtual

Definition at line 41 of file TimingServiceBase.cc.

41 {}
edm::TimingServiceBase::TimingServiceBase ( const TimingServiceBase )
privatedelete

Member Function Documentation

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.

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().

void TimingServiceBase::jobStarted ( )
static

Definition at line 26 of file TimingServiceBase.cc.

References s_jobStartTime.

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 }
static double s_jobStartTime
static double edm::TimingServiceBase::jobStartTime ( )
inlinestatic

Definition at line 45 of file TimingServiceBase.h.

References operator=(), s_jobStartTime, and TimingServiceBase().

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

45 { return s_jobStartTime; }
static double s_jobStartTime
const TimingServiceBase& edm::TimingServiceBase::operator= ( const TimingServiceBase )
privatedelete

Referenced by jobStartTime().

Member Data Documentation

double TimingServiceBase::s_jobStartTime = 0.0
staticprivate

Definition at line 52 of file TimingServiceBase.h.

Referenced by jobStarted(), and jobStartTime().