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

DESCRIPTION="Iterated TCP bidirectional transfers example"
DEFAULTS={'PLOT': 'box'}
AGGREGATOR='iteration'
ITERATIONS=3

DATA_SETS = o([
        ('TCP download',
         {'command': find_netperf("TCP_MAERTS", LENGTH, HOST),
          'delay': DELAY,
          'units': 'Mbits/s',
          # Using the 'process' runner rather than the netperf_demo runner will
          # capture only the last number output (the total bandwidth).
          'runner': 'process',}),
        ('TCP upload',
         {'command': find_netperf("TCP_STREAM", LENGTH, HOST),
          'delay': DELAY,
          'units': 'Mbits/s',
          'runner': 'process',}),
        ])


PLOTS = o([
    ('box',
     {'description': 'Box type plot',
      'type': 'box',
      'series': [{'data': 'TCP download',
                  'label': 'Download'},
                 {'data': 'TCP upload',
                  'label': 'Upload'},]}),
    ('timeseries',
     {'description': 'Timeseries type plot',
      'parent': 'box',
      'type': 'timeseries'}),
    ])
