CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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::TimingServiceBase ( )

Definition at line 39 of file TimingServiceBase.cc.

39 {}
edm::TimingServiceBase::TimingServiceBase ( const TimingServiceBase )
delete
TimingServiceBase::~TimingServiceBase ( )
virtual

Definition at line 41 of file TimingServiceBase.cc.

41 {}

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 47 of file TimingServiceBase.h.

References s_jobStartTime.

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

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

Member Data Documentation

double TimingServiceBase::s_jobStartTime = 0.0
staticprivate

Definition at line 50 of file TimingServiceBase.h.

Referenced by jobStarted(), and jobStartTime().