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

AGGREGATOR='timeseries'
TOTAL_LENGTH=LENGTH+2*DELAY
DESCRIPTION="UDP flood w/ping"
DEFAULTS={'PLOT': 'totals'}

BW=TEST_PARAMETERS.get("udp_bandwidth", None)

DATA_SETS = o([
        ('UDP upload',
         {'command': find_iperf(HOST, STEP_SIZE, LENGTH, IP_VERSION, udp=True, bw=BW),
          'delay': DELAY,
          'units': 'bits/s',
          'udp': True,
          'runner': 'iperf_csv',}),
        ('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': 'UDP upload',
                  'label': 'Upload'},
                 {'data': 'Ping (ms) ICMP',
                  'label': 'Ping (ms)',
                  'axis': 2}]}),
    ('ping_cdf',
     {'description': 'Ping CDF plot',
      'type': 'cdf',
      'series': [{'data': 'Ping (ms) ICMP',
                  'label': 'Ping (ms)'},],
      'cutoff': (DELAY,DELAY)}),
    ])

include("common.inc")
