Hybrid Query Processing Engine for Coprocessing in Database Systems
HyPE
hype::core::AlgorithmMeasurement Class Reference

This class represents an easy to use interface for time measurement of an algorithms execution time. More...

#include <algorithm_measurement.hpp>

Collaboration diagram for hype::core::AlgorithmMeasurement:

List of all members.

Public Member Functions

 AlgorithmMeasurement (const SchedulingDecision &scheduling_decision)
 constructs an AlgorithmMeasurement object
void afterAlgorithmExecution ()
 stops the time of an algorithms execution and adds obtained data to algorithm statistics.

Private Attributes

uint64_t timestamp_begin_
 timestamp fetched at construction time, used for time measurement
SchedulingDecision scheduling_decision_
 scheduling decision, where this object belongs to

Detailed Description

The user just have to create an object of AlgorithmMeasurement. Then, the algorithm that is to measure is executed. After that, the user has to call afterAlgorithmExecution(). The framework takes care of the rest.

Internally, afterAlgorithmExecution() stops the time and adds the received data to the algorithms statistics. It is crucial that the application executes the algortihm specified by the SchedulingDecision or the libraries behaviour is undefined.

Author:
Sebastian Breß
Version:
0.1
Date:
2012
Examples:
online_learning.cpp.

Definition at line 36 of file algorithm_measurement.hpp.


Constructor & Destructor Documentation

The constructor will fetch the current time. Therefore, it starts a timer to measure the execution time of the choosen algorithm. Therefore, the user should construct the AlgorithmMeasurement object directly before the algorithms call. Directly after the algorthm finished execution, afterAlgorithmExecution() has to be called to ensure a precise time measurement.

Parameters:
cheduling_decisiona reference to a SchedulingDecision

Definition at line 12 of file algorithm_measurement.cpp.


Member Function Documentation


Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines