summaryrefslogtreecommitdiff
path: root/bin
diff options
authorRod Smith <rod.smith@canonical.com>2015-07-16 09:20:11 -0400
committerRod Smith <rod.smith@canonical.com>2015-07-16 09:20:11 -0400
commit4bc47f5fa549a77b7557dd97379f3cae5c8929d9 (patch)
tree93166b1d3e10bb492e82b4741d51a29086dceab9 /bin
parente20293c99159980d899fa823d58c4cb1795db88c (diff)
Modified network script to support multiple tests per run (the default remains one test), and server's multi_nic test to run four tests.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/network9
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/network b/bin/network
index daef596..24dd3a5 100755
--- a/bin/network
+++ b/bin/network
@@ -393,7 +393,10 @@ def interface_test(args):
args.fail_threshold)
if args.datasize:
iperf_benchmark.data_size = args.datasize
- result = iperf_benchmark.run()
+ run_num = 0
+ while not result and run_num < args.num_runs:
+ result = iperf_benchmark.run()
+ run_num += 1
elif args.test_type.lower() == "stress":
stress_benchmark = StressPerformanceTest(args.interface,
@@ -517,6 +520,10 @@ TEST_TARGET_IPERF = iperf-server.example.com
"theoretical bandwidth) as a number like 80. (Default is "
"%(default)s)"))
test_parser.add_argument(
+ '--num_runs', type=int,
+ default=1,
+ help=("Number of times to run the test. (Default is %(default)s)"))
+ test_parser.add_argument(
'--debug', default=False, action="store_true",
help="Turn on verbose output")