aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-05-21 14:54:46 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-05-22 15:20:27 +0200
commit3a0dea682e73c605c2a4d45f0e7a8a39fba3bb6b (patch)
treeca63b0754dc9aa4e7a3027c5b16506ecc94e2ae2 /doc
parentd79e7198043f8b2a2c8c4e5651d2ce323fd84963 (diff)
iperf3: Support using configuring UDP protocol
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/examples/4g_srsLTE/suites/4g/iperf3_dl.py15
-rwxr-xr-xdoc/examples/4g_srsLTE/suites/4g/iperf3_ul.py15
2 files changed, 6 insertions, 24 deletions
diff --git a/doc/examples/4g_srsLTE/suites/4g/iperf3_dl.py b/doc/examples/4g_srsLTE/suites/4g/iperf3_dl.py
index d4fa649..bcc569a 100755
--- a/doc/examples/4g_srsLTE/suites/4g/iperf3_dl.py
+++ b/doc/examples/4g_srsLTE/suites/4g/iperf3_dl.py
@@ -1,17 +1,6 @@
#!/usr/bin/env python3
from osmo_gsm_tester.testenv import *
-def print_result_node(result, node_str):
- sent = result['end']['sum_sent']
- recv = result['end']['sum_received']
- print("Result %s:" % node_str)
- print("\tSEND: %d KB, %d kbps, %d seconds (%s retrans)" % (sent['bytes']/1000, sent['bits_per_second']/1000, sent['seconds'], str(sent.get('retransmits', 'unknown'))))
- print("\tRECV: %d KB, %d kbps, %d seconds" % (recv['bytes']/1000, recv['bits_per_second']/1000, recv['seconds']))
-
-def print_results(cli_res, srv_res):
- print_result_node(cli_res, 'client')
- print_result_node(srv_res, 'server')
-
epc = tenv.epc()
enb = tenv.enb()
ue = tenv.modem()
@@ -41,7 +30,9 @@ print('UE is attached')
print("Running iperf3 client to %s through %s" % (str(iperf3cli), ue.netns()))
proc.launch_sync()
iperf3srv.stop()
-print_results(iperf3cli.get_results(), iperf3srv.get_results())
+
+iperf3cli.print_results()
+iperf3srv.print_results(iperf3cli.proto() == iperf3cli.PROTO_UDP)
max_rate = enb.ue_max_rate(downlink=True)
res_str = ue.verify_metric(max_rate * 0.8, operation='avg', metric='dl_brate', criterion='gt')
diff --git a/doc/examples/4g_srsLTE/suites/4g/iperf3_ul.py b/doc/examples/4g_srsLTE/suites/4g/iperf3_ul.py
index 64d476b..a92a658 100755
--- a/doc/examples/4g_srsLTE/suites/4g/iperf3_ul.py
+++ b/doc/examples/4g_srsLTE/suites/4g/iperf3_ul.py
@@ -1,17 +1,6 @@
#!/usr/bin/env python3
from osmo_gsm_tester.testenv import *
-def print_result_node(result, node_str):
- sent = result['end']['sum_sent']
- recv = result['end']['sum_received']
- print("Result %s:" % node_str)
- print("\tSEND: %d KB, %d kbps, %d seconds (%s retrans)" % (sent['bytes']/1000, sent['bits_per_second']/1000, sent['seconds'], str(sent.get('retransmits', 'unknown'))))
- print("\tRECV: %d KB, %d kbps, %d seconds" % (recv['bytes']/1000, recv['bits_per_second']/1000, recv['seconds']))
-
-def print_results(cli_res, srv_res):
- print_result_node(cli_res, 'client')
- print_result_node(srv_res, 'server')
-
epc = tenv.epc()
enb = tenv.enb()
ue = tenv.modem()
@@ -41,7 +30,9 @@ print('UE is attached')
print("Running iperf3 client to %s through %s" % (str(iperf3cli), ue.netns()))
proc.launch_sync()
iperf3srv.stop()
-print_results(iperf3cli.get_results(), iperf3srv.get_results())
+
+iperf3cli.print_results()
+iperf3srv.print_results(iperf3cli.proto() == iperf3cli.PROTO_UDP)
max_rate = enb.ue_max_rate(downlink=False)
res_str = ue.verify_metric(max_rate * 0.8, operation='avg', metric='ul_brate', criterion='gt')