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() [1/2]

TimingServiceBase::TimingServiceBase ( )

Definition at line 39 of file TimingServiceBase.cc.

39 {}

◆ ~TimingServiceBase()

TimingServiceBase::~TimingServiceBase ( )
virtual

Definition at line 41 of file TimingServiceBase.cc.

41 {}

◆ TimingServiceBase() [2/2]

edm::TimingServiceBase::TimingServiceBase ( const TimingServiceBase )
privatedelete

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 OrderedSet::t.

◆ jobStartTime()

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

Definition at line 45 of file TimingServiceBase.h.

45 { return s_jobStartTime; }

References s_jobStartTime.

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

◆ operator=()

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

Member Data Documentation

◆ s_jobStartTime

double TimingServiceBase::s_jobStartTime = 0.0
staticprivate

Definition at line 52 of file TimingServiceBase.h.

Referenced by jobStarted(), and jobStartTime().

edm::TimingServiceBase::s_jobStartTime
static double s_jobStartTime
Definition: TimingServiceBase.h:52
OrderedSet.t
t
Definition: OrderedSet.py:90