class DataStore::Configuration
Used to set up and modify settings for the data store.
Attributes
The compression schema defines the compression of the data, i.e how the averages of the datapoints are calculated. Default: ‘[6,5,3,4,4,3]’ With the default settings: from every 6 datapoints an average value is calculated. From those calculated average values from every five values a new average value is created (The compression is now 6 * 5 = 30).
The data type in which the value is stored
Default: double
The database used for storing the data.
The location of the database.yml file
Enable logging.
Default: true
The frequency tells how often data entry is done. A frequency of 10 means a data entry once every 10 seconds.
Default: 10 sec
Tolerance of the frequency in which datapoints are added
Default: 0.05
This means a 5% margin. So with a frequency of 10s, the next datapoint within 9.95 - 10.5 is considered the next datapoint
The location of the log file
Default $stdout
The level of logging
Default: Logger::ERROR
The maximum datapoints is the maximum number of datapoint within a given timeframe
Default: 800
The prefix is used as a prefix for the database table name.
Public Class Methods
# File lib/data_store/configuration.rb, line 52 def initialize @prefix = 'ds_' @database = :postgres @compression_schema = '[6,5,3,4,4,3]' @frequency = 10 @maximum_datapoints = 800 @data_type = :double @database_config_file = File.expand_path('../../../config/database.yml', __FILE__) @log_file = $stdout @log_level = Logger::ERROR @enable_logging = true @frequency_tolerance = 0.05 end