Column-oriented GPU-accelerated Database Management System
CoGaDB
|
This class represents an easy to use interface for time measurement of an algorithms execution time. More...
#include <algorithm_measurement.hpp>
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 |
This class represents an easy to use interface for time measurement of an algorithms execution time.
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.
hype::core::AlgorithmMeasurement::AlgorithmMeasurement | ( | const SchedulingDecision & | scheduling_decision | ) | [explicit] |
constructs an AlgorithmMeasurement object
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.
cheduling_decision | a reference to a SchedulingDecision |
stops the time of an algorithms execution and adds obtained data to algorithm statistics.
To ensure a precise time measurement, afterAlgorithmExecution() has to be called directly after the algorthm finished execution.
scheduling decision, where this object belongs to
uint64_t hype::core::AlgorithmMeasurement::timestamp_begin_ [private] |
timestamp fetched at construction time, used for time measurement