All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MeterPU::CPU_Time_Measurement_Controller Struct Reference

CPU Time Measurement Controller. More...

#include <MeterPU.h>

Inheritance diagram for MeterPU::CPU_Time_Measurement_Controller:
Inheritance graph
[legend]
Collaboration diagram for MeterPU::CPU_Time_Measurement_Controller:
Collaboration graph
[legend]

Public Member Functions

 CPU_Time_Measurement_Controller ()
 
 CPU_Time_Measurement_Controller (CPU_Time::Time_Unit const &start_time_p, CPU_Time::Time_Unit const &stop_time_p)
 
void init ()
 
void start ()
 mark the start of a measurement phase/period. More...
 
void stop ()
 mark the end of a measurement phase/period. More...
 
void calc ()
 calculate the metric value between start() and stop(). More...
 
CPU_Time::ResultType const & get_value () const
 Get calculated metric value, require calc() to be called already. More...
 
void show_meter_reading () const
 Print the calculated metric value to standard output, requires an invocation of calc() already done. More...
 

Private Member Functions

 DECLARE_CLASS_NAME ("CPU_Time_Measurement_Controller")
 

Private Attributes

CPU_Time::Time_Unit start_time
 
CPU_Time::Time_Unit stop_time
 
CPU_Time::ResultType meter_reading
 

Detailed Description

CPU Time Measurement Controller.

Internally it uses clock_gettime() etc.

Constructor & Destructor Documentation

MeterPU::CPU_Time_Measurement_Controller::CPU_Time_Measurement_Controller ( )
inline
MeterPU::CPU_Time_Measurement_Controller::CPU_Time_Measurement_Controller ( CPU_Time::Time_Unit const &  start_time_p,
CPU_Time::Time_Unit const &  stop_time_p 
)
inline

Member Function Documentation

void MeterPU::CPU_Time_Measurement_Controller::calc ( )
inlinevirtual

calculate the metric value between start() and stop().

Implements MeterPU::Measurement_Controller.

Here is the caller graph for this function:

MeterPU::CPU_Time_Measurement_Controller::DECLARE_CLASS_NAME ( "CPU_Time_Measurement_Controller"  )
private
CPU_Time::ResultType const& MeterPU::CPU_Time_Measurement_Controller::get_value ( ) const
inline

Get calculated metric value, require calc() to be called already.

Here is the caller graph for this function:

void MeterPU::CPU_Time_Measurement_Controller::init ( )
inline
void MeterPU::CPU_Time_Measurement_Controller::show_meter_reading ( ) const
inlinevirtual

Print the calculated metric value to standard output, requires an invocation of calc() already done.

Implements MeterPU::Measurement_Controller.

Here is the call graph for this function:

void MeterPU::CPU_Time_Measurement_Controller::start ( )
inlinevirtual

mark the start of a measurement phase/period.

Implements MeterPU::Measurement_Controller.

void MeterPU::CPU_Time_Measurement_Controller::stop ( )
inlinevirtual

mark the end of a measurement phase/period.

Implements MeterPU::Measurement_Controller.

Member Data Documentation

CPU_Time::ResultType MeterPU::CPU_Time_Measurement_Controller::meter_reading
private
CPU_Time::Time_Unit MeterPU::CPU_Time_Measurement_Controller::start_time
private
CPU_Time::Time_Unit MeterPU::CPU_Time_Measurement_Controller::stop_time
private

The documentation for this struct was generated from the following file: