## -*- mode: python; coding: utf-8 -*-

include("rrul_be.conf")
DATA_SETS_RRUL = DATA_SETS
PLOTS_RRUL = PLOTS

include("http.conf")
DESCRIPTION="HTTP get latency with competing RRUL test"
DEFAULTS={'PLOT': 'totals_delay'}
TOTAL_LENGTH=LENGTH+2*DELAY

DATA_SETS.update(DATA_SETS_RRUL)
PLOTS.update(PLOTS_RRUL)
DATA_SETS['HTTP latency']['command'] = find_http_getter(STEP_SIZE, TOTAL_LENGTH)

PLOTS['http_delay_cdf']['cutoff'] = (DELAY,DELAY)
PLOTS['ping_delay'] = {'description': 'RRUL Ping and HTTP delay',
                       'type': 'timeseries',
                       'axis_labels': ['Latency (ms)'],
                       'series': [{'data': 'Ping (ms) avg',
                                   'label': 'Average ping RTT',
                                   'color': 'blue'},
                                   {'data': 'HTTP latency',
                                   'label': 'HTTP get (ms)'},]}
PLOTS['totals_delay'] = {'description': 'Total TCP bandwidth with ping and HTTP delay',
                        'type': 'meta',
                        'subplots': ('totals_bandwidth', 'ping_delay')}

PLOTS['cdf_combine'] = {'description': 'CDF combination of HTTP latency',
                        'type': 'cdf_combine',
                        'axis_labels': ['Mean download time (ms)'],
                        'series': [
                            {'data': 'HTTP latency',
                                    'label': 'HTTP get (ms)',
                                    'combine_mode': 'mean'}]}
PLOTS['bar_combine'] = {'description': 'Bar combination of HTTP latency',
                        'type': 'bar_combine',
                        'group_by': 'both',
                        'colour_by': 'series',
                        'axis_labels': ['Mean fetch time (ms)'],
                        'series': [
                            {'data': 'HTTP latency',
                                    'label': 'HTTP get (ms)',
                                    'combine_mode': 'mean'}]}

include("common.inc")
