1*9c5db199SXin LiAUTHOR = "[email protected] (Kelly Lucas)" 2*9c5db199SXin LiTIME = "SHORT" 3*9c5db199SXin LiNAME = "Netpipe Basic" 4*9c5db199SXin LiTEST_CATEGORY = "Stress" 5*9c5db199SXin LiTEST_CLASS = 'Hardware' 6*9c5db199SXin LiTEST_TYPE = "Server" 7*9c5db199SXin LiSYNC_COUNT = 2 8*9c5db199SXin LiDOC = """ 9*9c5db199SXin Linetpipe_test is a test which produces bandwidth and latency values for 10*9c5db199SXin Liincrementing buffer sizes. 11*9c5db199SXin Li 12*9c5db199SXin LiArguments to run_test: 13*9c5db199SXin Libidirectional - indicates whether the test should run simultaneously in both 14*9c5db199SXin Li directions 15*9c5db199SXin Libuffer_size - Sets the send and receive TCP buffer sizes (from man NPtcp) 16*9c5db199SXin Liupper_bound - Specify the upper boundary to the size of message being tested. 17*9c5db199SXin Li By default, NetPIPE will stop when the time to transmit a block 18*9c5db199SXin Li exceeds one second. (from man NPtcp) 19*9c5db199SXin Livariance - NetPIPE chooses the message sizes at regular intervals, 20*9c5db199SXin Li increasing them exponentially from the lower boundary to the 21*9c5db199SXin Li upper boundary. At each point, it also tests perturbations of 3 22*9c5db199SXin Li bytes above and 3 bytes below (default) each test point to find 23*9c5db199SXin Li idiosyncrasies in the system. This perturbation value can be 24*9c5db199SXin Li changed using using this option or turned off by setting 25*9c5db199SXin Li perturbation_size to 0. (from man NPtcp) 26*9c5db199SXin Li""" 27*9c5db199SXin Li 28*9c5db199SXin Lifrom autotest_lib.server import utils 29*9c5db199SXin Li 30*9c5db199SXin Libuffer_size = 1048576 31*9c5db199SXin Liupper_bound = 1048576 32*9c5db199SXin Livariance = 17 33*9c5db199SXin Li 34*9c5db199SXin Lidef run(pair): 35*9c5db199SXin Li job.run_test('netpipe', pair=pair, buffer=buffer_size, 36*9c5db199SXin Li upper_bound=upper_bound, variance=variance) 37*9c5db199SXin Li 38*9c5db199SXin Li# grab the pairs (and failures) 39*9c5db199SXin Li(pairs, failures) = utils.form_ntuples_from_machines(machines, 2) 40*9c5db199SXin Li 41*9c5db199SXin Li# log the failures 42*9c5db199SXin Lifor failure in failures: 43*9c5db199SXin Li job.record("FAIL", failure[0], "netpipe", failure[1]) 44*9c5db199SXin Li 45*9c5db199SXin Li# now run through each pair and run 46*9c5db199SXin Lijob.parallel_simple(run, pairs, log=False) 47