CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
FastTimerService::Measurement Struct Reference

Public Member Functions

void measure ()
 
void measure_and_store (Resources &store)
 
 Measurement ()
 

Public Attributes

boost::chrono::high_resolution_clock::time_point time_real
 
boost::chrono::thread_clock::time_point time_thread
 

Detailed Description

Definition at line 298 of file FastTimerService.h.

Constructor & Destructor Documentation

FastTimerService::Measurement::Measurement ( )
default

Member Function Documentation

void FastTimerService::Measurement::measure ( )

Definition at line 245 of file FastTimerService.cc.

References cmsPerfSuiteHarvest::now.

Referenced by FastTimerService::preModuleEvent(), and FastTimerService::preSourceEvent().

245  {
246  #ifdef DEBUG_THREAD_CONCURRENCY
247  id = std::this_thread::get_id();
248  #endif // DEBUG_THREAD_CONCURRENCY
251 }
boost::chrono::thread_clock::time_point time_thread
boost::chrono::high_resolution_clock::time_point time_real
void FastTimerService::Measurement::measure_and_store ( Resources store)

Definition at line 254 of file FastTimerService.cc.

References cmsPerfSuiteHarvest::now, FastTimerService::Resources::time_real, and FastTimerService::Resources::time_thread.

Referenced by FastTimerService::postModuleEvent(), and FastTimerService::postSourceEvent().

254  {
255  #ifdef DEBUG_THREAD_CONCURRENCY
256  assert(std::this_thread::get_id() == id);
257  #endif // DEBUG_THREAD_CONCURRENCY
258  auto new_time_thread = boost::chrono::thread_clock::now();
259  auto new_time_real = boost::chrono::high_resolution_clock::now();
260  store.time_thread = new_time_thread - time_thread;
261  store.time_real = new_time_real - time_real;
262  time_thread = new_time_thread;
263  time_real = new_time_real;
264 }
boost::chrono::thread_clock::time_point time_thread
boost::chrono::high_resolution_clock::time_point time_real

Member Data Documentation

boost::chrono::high_resolution_clock::time_point FastTimerService::Measurement::time_real

Definition at line 309 of file FastTimerService.h.

boost::chrono::thread_clock::time_point FastTimerService::Measurement::time_thread

Definition at line 308 of file FastTimerService.h.