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

## rrul46 test specification

GLOBAL_COMMAND4="netperf -P 0 -v 0 -D -%.1f -4" % STEP_SIZE
GLOBAL_COMMAND="netperf -P 0 -v 0 -D -%.1f -6" % STEP_SIZE
IP_VERSION=6

include("rrul.conf")
DESCRIPTION="Realtime Response Under Load - Mixed IPv4/6"

# make some of the netperf use IPv4
DATA_SETS['TCP upload BE']['command'] = "%s -Y CS0,CS0 -H %s -t TCP_STREAM -l %d -f m" % (
               GLOBAL_COMMAND4, HOST, LENGTH)
DATA_SETS['TCP upload BK']['command'] = "%s -Y CS1,CS1 -H %s -t TCP_STREAM -l %d -f m" % (
               GLOBAL_COMMAND4, HOST, LENGTH)

DATA_SETS['TCP download BE']['command'] = "%s -Y CS0,CS0 -H %s -t TCP_MAERTS -l %d -f m" % (
               GLOBAL_COMMAND4, HOST, LENGTH)
DATA_SETS['TCP download BK']['command'] = "%s -Y CS1,CS1 -H %s -t TCP_MAERTS -l %d -f m" % (
               GLOBAL_COMMAND4, HOST, LENGTH)

DATA_SETS['Ping (ms) UDP BE']['command'] = "%s -H %s -t UDP_RR -l %d" % (
                GLOBAL_COMMAND4, HOST, TOTAL_LENGTH)
DATA_SETS['Ping (ms) UDP BK']['command'] = "%s -Y CS1,CS1 -H %s -t UDP_RR -l %d" % (
                GLOBAL_COMMAND4, HOST, TOTAL_LENGTH)
DATA_SETS['Ping (ms) ICMP']['command'] = find_ping(6, STEP_SIZE, TOTAL_LENGTH, HOST)

# the 46 test uses different UDP pings, so remove some and add some in
del DATA_SETS['Ping (ms) UDP EF']

DATA_SETS['Ping (ms) UDP6 BE'] = {'command': "%s -H %s -t UDP_RR -l %d" % (GLOBAL_COMMAND, HOST, TOTAL_LENGTH),
                                  'data_transform': 'rr_to_ms',
                                  'units': 'ms',
                                  'runner': 'netperf_demo',}
DATA_SETS['Ping (ms) UDP6 BK'] = {'command': "%s -Y CS1,CS1 -H %s -t UDP_RR -l %d" % (GLOBAL_COMMAND, HOST, TOTAL_LENGTH),
                                  'data_transform': 'rr_to_ms',
                                  'units': 'ms',
                                  'runner': 'netperf_demo',}

# the ping plot should use the new data set names
PLOTS['ping']['series'] = [
    {'data': 'Ping (ms) UDP BK',
     'label': 'UDP BK'},
    {'data': 'Ping (ms) UDP BE',
     'label': 'UDP BE'},
    {'data': 'Ping (ms) UDP6 BK',
     'label': 'UDP6 BK'},
    {'data': 'Ping (ms) UDP6 BE',
     'label': 'UDP6 BE'},
    {'data': 'Ping (ms) ICMP',
     'label': 'ICMP'},
    {'data': 'Ping (ms) avg',
     'label': 'Avg',
     'smoothing': 10,
     'color': 'black',
     'linewidth': 2}]
