mbligh | 3649141 | 2010-03-05 23:54:13 +0000 | [diff] [blame] | 1 | AUTHOR = "kdlucas@google.com (Kelly Lucas)" |
mbligh | cf8e0b7 | 2008-09-12 02:14:29 +0000 | [diff] [blame] | 2 | TIME = "SHORT" |
mbligh | 3649141 | 2010-03-05 23:54:13 +0000 | [diff] [blame] | 3 | NAME = "Netpipe Basic" |
mbligh | cf8e0b7 | 2008-09-12 02:14:29 +0000 | [diff] [blame] | 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: |
mbligh | cf8e0b7 | 2008-09-12 02:14:29 +0000 | [diff] [blame] | 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) |
mbligh | 3649141 | 2010-03-05 23:54:13 +0000 | [diff] [blame] | 19 | variance - NetPIPE chooses the message sizes at regular intervals, |
mbligh | cf8e0b7 | 2008-09-12 02:14:29 +0000 | [diff] [blame] | 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 | |
mbligh | 3649141 | 2010-03-05 23:54:13 +0000 | [diff] [blame] | 30 | buffer_size = 1048576 |
| 31 | upper_bound = 1048576 |
| 32 | variance = 17 |
mbligh | cf8e0b7 | 2008-09-12 02:14:29 +0000 | [diff] [blame] | 33 | |
| 34 | def run(pair): |
mbligh | 3649141 | 2010-03-05 23:54:13 +0000 | [diff] [blame] | 35 | job.run_test('netpipe', pair=pair, buffer=buffer_size, |
| 36 | upper_bound=upper_bound, variance=variance) |
mbligh | cf8e0b7 | 2008-09-12 02:14:29 +0000 | [diff] [blame] | 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 |
mbligh | 5d69ff0 | 2008-09-12 17:45:46 +0000 | [diff] [blame] | 46 | job.parallel_simple(run, pairs, log=False) |