Hybrid Query Processing Engine for Coprocessing in Database Systems
HyPE
statistics_gatherer.hpp
Go to the documentation of this file.
00001 /***********************************************************************************************************
00002 Copyright (c) 2012, Sebastian Breß, Otto-von-Guericke University of Magdeburg, Germany. All rights reserved.
00003 
00004 This program and accompanying materials are made available under the terms of the 
00005 GNU LESSER GENERAL PUBLIC LICENSE - Version 3, http://www.gnu.org/licenses/lgpl-3.0.txt
00006 ***********************************************************************************************************/
00007 #pragma once
00008 
00009 #include <config/exports.hpp>
00010 #include <core/workload_generator.hpp>
00011 #include <cassert>
00012 
00013 /* temporarily disable warnings because of missing STL DLL interface */
00014 #ifdef _MSC_VER
00015 #  pragma warning(push)
00016 #  pragma warning(disable: 4251)
00017 #endif
00018 
00019 namespace hype{
00020    namespace core{
00021       class HYPE_EXPORT StatisticsGatherer{
00022          public:
00023             StatisticsGatherer(const std::string& operation_name);
00024 
00025             bool addStatistics(const WorkloadGenerator& w);
00026 
00027             void printReport() const throw();
00028          private:
00029             std::string operation_name_;
00030             unsigned int number_of_right_decisions_;
00031             unsigned int number_of_total_decisions_;
00033             std::vector<double> isolated_execution_time_of_algorithms_;
00034             std::vector<std::string> names_of_algorithms_;
00035             //reference models
00036             double execution_time_of_ideal_model_;
00037             double execution_time_of_cpu_only_model_;
00038             double execution_time_of_gpu_only_model_;
00039             //for real model
00040             double execution_time_of_real_model_;
00041             double total_time_for_overhead_of_addObservation_;
00042             double total_time_for_overhead_of_getOptimalAlgorithm_;
00043             //Feature: inter device parallelism
00044             double inter_device_parallel_time_cpu_;
00045             double inter_device_parallel_time_gpu_;            
00046       };
00047       
00048 
00049    }; //end namespace core
00050 }; //end namespace hype
00051 
00052 #ifdef _MSC_VER
00053 #  pragma warning(pop)
00054 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines