1AUTHOR = "kdlucas@google.com (K.D. Lucas)" 2TIME = "SHORT" 3NAME = "Netperf Basic" 4TEST_CATEGORY = "Benchmark" 5TEST_CLASS = 'Network' 6TEST_TYPE = "Server" 7SYNC_COUNT = 2 8DOC = """ 9netperf2 is a 2 machine test (server/client) that measures the performance 10of various network attributes. 11 12Arguments to run_test: 13 14test - the list of valid netperf tests that can be run 15 This currently is: 16 TCP_STREAM, TCP_SENDFILE, TCP_RR, TCP_CRR, UDP_STREAM, UDP_RR 17test_time - Specifies how long each iteration of the test should run for. 18stream_list - A list containing the number of streams to run the test for. If 19 the list is [1,10,100] then the test will run 3 times. If 20 bidirectional is set then there will be the specified number of 21 bidirectional streams. 22cycles - The number of times to run each test. 23""" 24 25from autotest_lib.server import utils 26 27 28def run(pair): 29 job.run_test('netperf2', pair=pair, test='TCP_STREAM', time=10, 30 stream_list=[1], cycles=1) 31 32# grab the pairs (and failures) 33(pairs, failures) = utils.form_ntuples_from_machines(machines, 2) 34 35# log the failures 36for failure in failures: 37 job.record("FAIL", failure[0], "netperf2", failure[1]) 38 39# now run through each pair and run 40job.parallel_simple(run, pairs, log=False) 41