#include <CPUTimer.h>
Classes | |
struct | Times |
Public Member Functions | |
void | add (const Times &t) |
double | cpuTime () const |
CPUTimer () | |
CPUTimer (CPUTimer &&)=default | |
double | realTime () const |
void | reset () |
void | start () |
Times | stop () |
~CPUTimer () | |
Private Types | |
enum | State { kRunning, kStopped } |
Private Member Functions | |
Times | calculateDeltaTime () const |
CPUTimer (const CPUTimer &)=delete | |
const CPUTimer & | operator= (const CPUTimer &)=delete |
Private Attributes | |
double | accumulatedCPUTime_ |
double | accumulatedRealTime_ |
struct timeval | startCPUTime_ |
struct timeval | startRealTime_ |
enum edm::CPUTimer::State | state_ |
Definition at line 37 of file CPUTimer.h.
|
private |
Enumerator | |
---|---|
kRunning | |
kStopped |
Definition at line 72 of file CPUTimer.h.
CPUTimer::CPUTimer | ( | ) |
Definition at line 33 of file CPUTimer.cc.
References startCPUTime_, and startRealTime_.
CPUTimer::~CPUTimer | ( | ) |
Definition at line 56 of file CPUTimer.cc.
|
default |
|
privatedelete |
void CPUTimer::add | ( | const Times & | t | ) |
Definition at line 113 of file CPUTimer.cc.
References accumulatedCPUTime_, accumulatedRealTime_, edm::CPUTimer::Times::cpu_, and edm::CPUTimer::Times::real_.
Referenced by counter.Counter::register().
|
private |
Definition at line 119 of file CPUTimer.cc.
References CLOCK_MONOTONIC, CLOCK_PROCESS_CPUTIME_ID, edm::CPUTimer::Times::cpu_, edm::hlt::Exception, edm::CPUTimer::Times::real_, startCPUTime_, and startRealTime_.
Referenced by cpuTime(), realTime(), and stop().
double CPUTimer::cpuTime | ( | ) | const |
Definition at line 158 of file CPUTimer.cc.
References accumulatedCPUTime_, calculateDeltaTime(), edm::CPUTimer::Times::cpu_, kStopped, and state_.
Referenced by ZDCMonitorModule::analyze(), CastorMonitorModule::analyze(), edm::SystemTimeKeeper::fillTriggerTimingReport(), HcalBaseMonitor::setupDepthHists1D(), and HcalBaseMonitor::setupDepthHists2D().
double CPUTimer::realTime | ( | ) | const |
Definition at line 150 of file CPUTimer.cc.
References accumulatedRealTime_, calculateDeltaTime(), kStopped, edm::CPUTimer::Times::real_, and state_.
Referenced by edm::service::ResourceEnforcer::check(), and edm::SystemTimeKeeper::fillTriggerTimingReport().
void CPUTimer::reset | ( | void | ) |
Definition at line 107 of file CPUTimer.cc.
References accumulatedCPUTime_, and accumulatedRealTime_.
Referenced by ZDCMonitorModule::analyze(), CastorMonitorModule::analyze(), CastorRecHitMonitor::processEvent(), HcalZDCMonitor::processEvent(), HcalZDCMonitor::setup(), HcalBaseMonitor::setupDepthHists1D(), and HcalBaseMonitor::setupDepthHists2D().
void CPUTimer::start | ( | void | ) |
Definition at line 74 of file CPUTimer.cc.
References CLOCK_MONOTONIC, CLOCK_PROCESS_CPUTIME_ID, edm::hlt::Exception, kRunning, kStopped, startCPUTime_, startRealTime_, and state_.
Referenced by progressbar.ProgressBar::__next__(), ZDCMonitorModule::analyze(), CastorMonitorModule::analyze(), XrdAdaptor::RequestManager::handle(), CastorRecHitMonitor::processEvent(), HcalZDCMonitor::processEvent(), edm::service::ResourceEnforcer::ResourceEnforcer(), HcalZDCMonitor::setup(), HcalBaseMonitor::setupDepthHists1D(), HcalBaseMonitor::setupDepthHists2D(), and edm::SystemTimeKeeper::startProcessingLoop().
CPUTimer::Times CPUTimer::stop | ( | ) |
Definition at line 94 of file CPUTimer.cc.
References accumulatedCPUTime_, accumulatedRealTime_, calculateDeltaTime(), edm::CPUTimer::Times::cpu_, kRunning, kStopped, edm::CPUTimer::Times::real_, state_, and tree::t.
Referenced by ZDCMonitorModule::analyze(), CastorMonitorModule::analyze(), XrdAdaptor::RequestManager::handle(), HcalBaseMonitor::setupDepthHists1D(), HcalBaseMonitor::setupDepthHists2D(), and edm::SystemTimeKeeper::stopProcessingLoop().
|
private |
|
private |
Definition at line 81 of file CPUTimer.h.
Referenced by add(), realTime(), reset(), and stop().
|
private |
Definition at line 78 of file CPUTimer.h.
Referenced by calculateDeltaTime(), CPUTimer(), and start().
|
private |
Definition at line 77 of file CPUTimer.h.
Referenced by calculateDeltaTime(), CPUTimer(), and start().
|
private |
Referenced by cpuTime(), realTime(), start(), and stop().