Home | History | Annotate | Download | only in netpipe
      1 AUTHOR = "kdlucas (a] google.com (Kelly Lucas)"
      2 TIME = "SHORT"
      3 NAME = "Netpipe Basic"
      4 TEST_CATEGORY = "Stress"
      5 TEST_CLASS = 'Hardware'
      6 TEST_TYPE = "Server"
      7 SYNC_COUNT = 2
      8 DOC = """
      9 netpipe_test is a test which produces bandwidth and latency values for
     10 incrementing buffer sizes.
     11 
     12 Arguments to run_test:
     13 bidirectional - indicates whether the test should run simultaneously in both
     14                 directions
     15 buffer_size   - Sets the send and receive TCP buffer sizes (from man NPtcp)
     16 upper_bound   - Specify the upper boundary to the size of message being tested.
     17                 By default, NetPIPE will stop when the time to transmit a block
     18                 exceeds one second. (from man NPtcp)
     19 variance      -  NetPIPE chooses the message sizes at regular intervals,
     20                 increasing them exponentially from the lower boundary to the
     21                 upper boundary. At each point, it also tests perturbations of 3
     22                 bytes above and 3 bytes below (default) each test point to find
     23                 idiosyncrasies in the system. This perturbation  value  can be
     24                 changed using using this option or turned off by setting
     25                 perturbation_size to 0. (from man NPtcp)
     26 """
     27 
     28 from autotest_lib.server import utils
     29 
     30 buffer_size = 1048576
     31 upper_bound = 1048576
     32 variance = 17
     33 
     34 def run(pair):
     35     job.run_test('netpipe', pair=pair, buffer=buffer_size,
     36                  upper_bound=upper_bound, variance=variance)
     37 
     38 # grab the pairs (and failures)
     39 (pairs, failures) = utils.form_ntuples_from_machines(machines, 2)
     40 
     41 # log the failures
     42 for failure in failures:
     43     job.record("FAIL", failure[0], "netpipe", failure[1])
     44 
     45 # now run through each pair and run
     46 job.parallel_simple(run, pairs, log=False)
     47