RRD_PLOT_CHARACTER = ['--lower-limit', '0', '--rigid', '--alt-autoscale-max', '--font', 'WATERMARK:7'] # nr. of '=' displayed by log NR_REPEAT = 28 # specific parameters AVG_TH_PARAM = 'AvgThroughput' INDICATOR_PARAM = 'ReceptionRatio' DOWN_B_PARAM = 'DownloadBytes' DOWN_T_PARAM = 'DownloadTime' ENC_PARAM = 'EncodingRate' DOWN_INT_PARAM = 'DownloadInterruptions' VIDEO_PERCENTAGE_PARAM = 'VideosWithInterruptions' # parameters to extract from db PARAMETERS = sorted(UNITS.keys()) # parameters that do not exist in db PARAM_NO_DB = sorted(NO_DB_RECORDS_UNITS.keys()) # all parameters to plot ALL_PARAM = sorted(PARAMETERS + PARAM_NO_DB) # parameters that are measured in bytes PARAMETERS_IN_BYTES = ['DownloadBytes', 'InitialData', 'VideoLength'] # parameters that include buffering time PARAMETERS_FOR_BUFFERING = ['BufferingDuration', 'BufferDurationAtEnd'] # parameters that should be genrally zero PARAMETERS_GENERALLY_ZERO = ([DOWN_INT_PARAM, VIDEO_PERCENTAGE_PARAM] + PARAMETERS_FOR_BUFFERING) # indexes of parameters (for example {'DownloadTime': 0}) INDEX_DICT = dict((v, k) for (k, v) in enumerate(ALL_PARAM)) # power of 10 for Mega MEGA_ORDER = 6
DB_KEY = 'Database_archive' # key that is used to link to the description DOC_KEY = 'Project_documentation' # database extension DB_EXTENSION = '(pytomo_database\.db)$' # database input parameter DB_INPUT = '?db=' # units for graphs that do not have records in the database NO_DB_RECORDS_UNITS = { 'AvgThroughput': 'kbps', 'ReceptionRatio': '', 'VideosWithInterruptions': '' } # dictionary with mappings for what to plot ALL_PLOTS = { ALL_KEY: sorted(UNITS.keys() + NO_DB_RECORDS_UNITS.keys()), MAIN_KEY: ['VideosWithInterruptions', 'AvgThroughput', 'BufferingDuration', 'PingAvg'], 'QoE': ['VideosWithInterruptions','DownloadInterruptions', 'ReceptionRatio', 'BufferingDuration', 'BufferDurationAtEnd'], 'QoS': ['AvgThroughput', 'MaxInstantThp', 'InitialRate', 'InitialData', 'DownloadBytes', 'DownloadTime', 'PlaybackDuration', 'PingMin', 'PingAvg', 'PingMax'], 'Video_characteristics': ['VideoLength', 'VideoDuration', 'EncodingRate'], 'ESMC': ['AvgThroughput', 'PingAvg', 'VideosWithInterruptions', 'ResolveTime', 'TimeTogetFirstByte', 'StatusCode'] } # dictionary with explanations for what is plotted MAN_PLOTS = { 'PingMin': 'The minimum recorded ping time to the resolved IP address'