Home | History | Annotate | Download | only in netperf2
      1 AUTHOR = "kdlucas (a] google.com (Kelly Lucas)"
      2 TIME = "MEDIUM"
      3 NAME = "Netperf Stress"
      4 TEST_CATEGORY = "Stress"
      5 TEST_CLASS = 'Network'
      6 TEST_TYPE = "Server"
      7 SYNC_COUNT = 2
      8 DOC = """
      9 netperf_stress is a 2 machine test (server/client) that measures the performance
     10 of various network attributes. This test will cycle through the various types
     11 of supported tests and streams, and will take about 1 hour to run. 
     12 You can adjust the streams by changing the values of the streams list in the
     13 run function.
     14 
     15 Arguments to run_test:
     16 
     17 test          - the list of valid netperf tests that can be run
     18                 This currently is:
     19                   TCP_STREAM, TCP_SENDFILE, TCP_RR, TCP_CRR, UDP_STREAM, UDP_RR
     20 test_time     - Specifies how long each iteration of the test should run for.
     21 stream_list   - A list containing the number of streams to run the test for. If
     22                 the list is [1,10,100] then the test will run 3 times. If
     23                 bidirectional is set then there will be the specified number of
     24                 bidirectional streams.
     25 """
     26 
     27 from autotest_lib.server import utils
     28 
     29 
     30 def run(pair):
     31     """
     32     Run netperf with various parameter settings.
     33     """
     34     streams = [1, 10, 20, 40, 60, 80, 100, 200]
     35     for t in ['TCP_STREAM', 'TCP_MAERTS', 'TCP_RR', 'TCP_CRR', 'UDP_RR']:
     36         tag = 'netprerf2' + t
     37         job.run_test('netperf2', tag=tag, pair=pair, test=t, time=60,
     38                      stream_list=streams, cycles=1)
     39 
     40 
     41 # grab the pairs (and failures)
     42 (pairs, failures) = utils.form_ntuples_from_machines(machines, 2)
     43 
     44 # log the failures
     45 for failure in failures:
     46     job.record("FAIL", failure[0], "netperf2", failure[1])
     47 
     48 # now run through each pair and run
     49 job.parallel_simple(run, pairs, log=False)
     50