Hybrid Query Processing Engine for Coprocessing in Database Systems
HyPE
configuration.hpp
Go to the documentation of this file.
00001 #include "exports.hpp"
00002 #include "global_definitions.hpp"
00003 #pragma once
00004 namespace hype{
00005    namespace core{
00006       
00007    class Static_Configuration{
00008       public:
00009       enum {
00010          length_of_initial_training_phase=10,
00011          length_of_history=1000,
00012          period_for_periodic_recomputation=100,
00013          maximal_time_where_algorithm_was_not_choosen=8,
00014          maximal_retraining_length=1,
00015          window_size_for_windowed_average_relative_estimation_error=100,
00016          maximal_slowdown_of_non_optimal_algorithm_in_percent=10, //%
00017          ready_queue_length_of_processing_devices=100,
00018                 print_algorithm_statistics_report = 0,
00019                 default_optimization_criterion = 1
00020       };
00021       
00022    };
00023    
00024    class HYPE_EXPORT Runtime_Configuration{
00025    public:
00026       
00027       static Runtime_Configuration& instance() throw();
00028       
00029       bool setHistoryLength(unsigned int history_length) throw();
00030       
00031       bool setRecomputationPeriod(unsigned int length_of_recomputation_period) throw();
00032       
00033       bool setRetrainingLength(unsigned int retraining_length) throw();
00034       
00035       bool setAlgorithmMaximalIdleTime(unsigned int max_idle_time) throw();
00036       
00037       bool setMaximalReadyQueueLength(unsigned int max_ready_queue_length_of_processing_devices) throw();
00038       
00039       bool setOutlinerThreshold(double threshold) throw();
00040       
00041       unsigned int getTrainingLength() const throw();
00042       
00043       unsigned int getHistoryLength() const throw();
00044       
00045       unsigned int getRecomputationPeriod() const throw();
00046       
00047       unsigned int getRetrainingLength() const throw();
00048       
00049       unsigned int getAlgorithmMaximalIdleTime() const throw();
00050       
00051       unsigned int getRelativeErrorWindowSize() const throw();
00053       unsigned int getMaximalSlowdownOfNonOptimalAlgorithm() const throw();
00054       
00055       unsigned int getMaximalReadyQueueLength() const throw();
00056       
00057       double getOutlinerThreshold() const throw();
00058 
00059             bool printAlgorithmStatistics() const throw ();
00060 
00061             bool isQueryChoppingEnabled() const throw ();
00062 
00063             bool setQueryChoppingEnabled(bool value) throw ();
00064 
00065             OptimizationCriterion getDefaultOptimizationCriterion() const throw ();
00066 
00067             bool setDefaultOptimizationCriterion(unsigned int value) throw ();
00068 
00069    private:
00070       Runtime_Configuration();
00071       Runtime_Configuration(const Runtime_Configuration&);
00072       Runtime_Configuration& operator=(const Runtime_Configuration&);
00073       
00074       unsigned int length_of_initial_training_phase_;
00075       unsigned int length_of_history_;
00076       unsigned int period_for_periodic_recomputation_;
00077       unsigned int maximal_time_where_algorithm_was_not_choosen_;
00078       unsigned int maximal_retraining_length_;
00079       unsigned int window_size_for_windowed_average_relative_estimation_error_;
00080       unsigned int maximal_slowdown_of_non_optimal_algorithm_in_percent_;
00081       unsigned int ready_queue_length_of_processing_devices_;
00082       bool print_algorithm_statistics_report_;
00083             bool enableQueryChopping_;
00084             unsigned int defaultOptimizationCriterion_;
00085       //double outliner_threshold_in_percent_;
00086    };
00087    
00088 
00089       
00090    };//end namespace core
00091 }; //end namespace hype    
00092       
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines