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

include("rrul_be.conf")
DESCRIPTION="VoIP one-way stream test with competing RRUL test"
DEFAULTS={'PLOT': 'totals_loss'}
TOTAL_LENGTH=LENGTH+2*DELAY

VOIP_HOST=HOST
VOIP_LOCAL_BIND=LOCAL_BIND[0] if LOCAL_BIND else None
VOIP_CONTROL_HOST=CONTROL_HOST or HOST
VOIP_LENGTH=TOTAL_LENGTH
VOIP_CUTOFF=(DELAY,DELAY)
include("voip.inc")

PLOTS['ping_delay'] = {'description': 'RRUL Ping and VoIP one-way delay',
                       'type': 'timeseries',
                       'axis_labels': ['Latency (ms)'],
                       'series': [{'data': 'Ping (ms) avg',
                                   'label': 'Average ping RTT',
                                   'color': 'blue'},
                                   {'data': 'VoIP::delay',
                                   'label': 'VoIP one-way delay'},
                                  {'data': 'VoIP::jitter',
                                   'label': 'VoIP jitter',
                                   'color': 'green'},]}
PLOTS['totals_loss'] = {'description': 'Total TCP bandwidth with ping, delay, jitter and loss',
                        'type': 'meta',
                        'subplots': ('totals', 'ping_delay', 'loss')}
PLOTS['box_combine'] = {'description': "Box combination plot",
                        'type': 'box_combine',
                        'cutoff': (DELAY,DELAY),
                        'dual_axes': True,
                        'axis_labels': ['Mean goodput (Mbps)', 'Mean induced delay (ms)'],
                        'series': [{'data': 'TCP download sum',
                                    'label': 'Total TCP download',
                                    'combine_mode': 'meta:MEAN_VALUE'},
                                   {'data': 'TCP upload sum',
                                    'label': 'Total TCP upload',
                                    'combine_mode': 'meta:MEAN_VALUE'},
                                    {'data': 'VoIP::delay',
                                     'label': 'Induced VoIP delay',
                                     'combine_mode': 'mean_span',
                                     'axis': 2}]}
PLOTS['cdf_combine'] = {'description': "CDF combination plot",
                        'type': 'cdf_combine',
                        'axis_labels': ['Induced one-way delay (ms)'],
                        'group_by': 'groups_concat',
                        'cutoff': (DELAY,DELAY),
                        'series': [{'data': 'VoIP::delay',
                                     'label': 'VoIP delay',
                                     'markevery': 10,
                                     'combine_mode': 'span'}]}

include("common.inc")
