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

include("netperf_definitions.inc")
DESCRIPTION="Four TCP upload streams; 2nd streams started delayed, cubic vs BBR"
DEFAULTS={'PLOT': 'totals'}
TOTAL_LENGTH=(LENGTH + DELAY*6)

DATA_SETS = o([
        ('TCP bbr 1',
         {'command': find_netperf("TCP_STREAM", LENGTH, HOST,
		extra_test_args="-M ,64k -K bbr,bbr"),
          'units': 'Mbits/s',
          'runner': 'netperf_demo',}),
        ('TCP cubic 2',
         {'command': find_netperf("TCP_STREAM", LENGTH, HOST,
		extra_test_args="-M ,64k -K cubic,cubic"),
          'delay': DELAY,
          'units': 'Mbits/s',
          'runner': 'netperf_demo',}),
        ('TCP cubic 3',
         {'command': find_netperf("TCP_STREAM", LENGTH, HOST,
		extra_test_args="-M ,64k -K cubic,cubic"),
          'delay': DELAY*5,
          'units': 'Mbits/s',
          'runner': 'netperf_demo',}),
        ('TCP bbr 4',
         {'command': find_netperf("TCP_STREAM", LENGTH, HOST,
		extra_test_args="-M ,64k -K bbr,bbr"),
          'delay': DELAY*3,
          'units': 'Mbits/s',
          'runner': 'netperf_demo',}),
        ]
)


PLOTS = o([
    ('totals',
     {'description': 'Bandwidth plot',
      'type': 'timeseries',
      'series': [{'data': 'TCP bbr 1',
                  'label': 'BBR 1'},
                  {'data': 'TCP cubic 2',
                  'label': 'Cubic 2'},
                  {'data': 'TCP cubic 3',
                  'label': 'Cubic 3'},
                  {'data': 'TCP bbr 4',
                  'label': 'BBR 4'},]}
	),
    ('totals_5s',
     {'description': 'Bandwidth plot, 5 second smoothed sample size',
      'type': 'timeseries',
      'series': [{'data': 'TCP bbr 1',
                  'label': 'BBR 1',
                  'smoothing': 5.0/STEP_SIZE},
                  {'data': 'TCP cubic 2',
                  'label': 'Cubic 2',
                  'smoothing': 5.0/STEP_SIZE},
                  {'data': 'TCP cubic 3',
                  'label': 'Cubic 3',
                  'smoothing': 5.0/STEP_SIZE},
                  {'data': 'TCP bbr 4',
                  'label': 'BBR 4',
                  'smoothing': 5.0/STEP_SIZE}]},
	),
    ('box_combine',
     {'description': 'Summarising combined tests',
      'type': 'box_combine',
      'cutoff': (DELAY,0),
      'group_by': 'series',
      'axis_labels': ['Mean bandwidth (MBits/s)'],
      'series': [{'data': 'TCP bbr 1',
                  'label': 'BBR 1',
                  'combine_mode': 'meta:MEAN_VALUE'},
                  {'data': 'TCP cubic 2',
                  'label': 'Cubic 2',
                  'combine_mode': 'meta:MEAN_VALUE'},
                  {'data': 'TCP cubic 3',
                  'label': 'Cubic 3',
                  'combine_mode': 'meta:MEAN_VALUE'},
                  {'data': 'TCP bbr 4',
                  'label': 'BBR 4',
                  'combine_mode': 'meta:MEAN_VALUE'}]},
	),
    ])

include("common.inc")
