Column-oriented GPU-accelerated Database Management System
CoGaDB
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

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.

Author:
Sebastian Breß
Version:
0.1
Date:
2012
Todo:
This class is designed to be a local class, for 2 different tiem measurements, two different objects have to be instanciated. It is NOT meaningful to create an AlgorithmMeasurement object on the heap. Therefore, heap based objects should be forbidden by making the operators new and new[] private. Furtheremore, the object should not be copyable, so making the copy cosntructur and copy assignment operator is necessary as well.

Constructor & Destructor Documentation

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.

Parameters:
cheduling_decisiona reference to a SchedulingDecision

Member Function Documentation

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.


Member Data Documentation

scheduling decision, where this object belongs to

timestamp fetched at construction time, used for time measurement


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