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

include("netperf_definitions.inc")
DESCRIPTION="Bidirectional TCP streams w/ping"
DEFAULTS={'PLOT': 'totals'}

DATA_SETS = o([
        ('TCP download',
         {'command': "%s -H %s -t TCP_MAERTS -l %d -f m" % (GLOBAL_COMMAND, HOST, LENGTH),
          'delay': DELAY,
          'units': 'Mbits/s',
          'runner': 'netperf_demo',}),
        ('TCP upload',
         {'command': "%s -H %s -t TCP_STREAM -l %d -f m" % (GLOBAL_COMMAND, HOST, LENGTH),
          'delay': DELAY,
          'units': 'Mbits/s',
          'runner': 'netperf_demo',}),
        ('Ping (ms) ICMP',
         {'command': find_ping(IP_VERSION, STEP_SIZE, TOTAL_LENGTH, HOST),
          'units': 'ms',
          'runner': 'ping',}),
        ])


PLOTS = o([
    ('totals',
     {'description': 'Bandwidth and ping plot',
      'type': 'timeseries',
      'dual_axes': True,
      'series': [{'data': 'TCP download',
                  'label': 'Download'},
                 {'data': 'TCP upload',
                  'label': 'Upload'},
                 {'data': 'Ping (ms) ICMP',
                  'label': 'Ping (ms)',
                  'color': 'red',
                  'axis': 2}]}),
    ('ping_cdf',
     {'description': 'Ping CDF plot',
      'type': 'cdf',
      'series': [{'data': 'Ping (ms) ICMP',
                  'label': 'Ping (ms)'},],
      'cutoff': (DELAY,DELAY)}),
    ])
