Update nuttcp and iperf to latest
Change-Id: I9e06e759f7ccd82b682b69aa0b631fdb607f324d
This commit is contained in:
parent
dd33f6a1df
commit
f2449844b3
File diff suppressed because it is too large
Load Diff
@ -35,7 +35,7 @@ def get_bdw_kbps(bdw, bdw_unit):
|
|||||||
class IperfTool(PerfTool):
|
class IperfTool(PerfTool):
|
||||||
|
|
||||||
def __init__(self, instance):
|
def __init__(self, instance):
|
||||||
PerfTool.__init__(self, 'iperf', instance)
|
PerfTool.__init__(self, 'iperf-2.0.9', instance)
|
||||||
|
|
||||||
def get_server_launch_cmd(self):
|
def get_server_launch_cmd(self):
|
||||||
'''Return the command to launch the server side.'''
|
'''Return the command to launch the server side.'''
|
||||||
@ -66,6 +66,8 @@ class IperfTool(PerfTool):
|
|||||||
bidir = bidirectional
|
bidir = bidirectional
|
||||||
loop_count = self.instance.config.tcp_tp_loop_count
|
loop_count = self.instance.config.tcp_tp_loop_count
|
||||||
for pkt_size in pkt_size_list:
|
for pkt_size in pkt_size_list:
|
||||||
|
self.instance.display('Measuring %s Throughput (packet size=%d)...',
|
||||||
|
proto, pkt_size)
|
||||||
for _ in xrange(loop_count):
|
for _ in xrange(loop_count):
|
||||||
res = self.run_client_dir(target_ip, mss,
|
res = self.run_client_dir(target_ip, mss,
|
||||||
bandwidth_kbps=bandwidth,
|
bandwidth_kbps=bandwidth,
|
||||||
|
@ -21,7 +21,7 @@ import sshutils
|
|||||||
class NuttcpTool(PerfTool):
|
class NuttcpTool(PerfTool):
|
||||||
|
|
||||||
def __init__(self, instance):
|
def __init__(self, instance):
|
||||||
PerfTool.__init__(self, 'nuttcp-7.3.2', instance)
|
PerfTool.__init__(self, 'nuttcp-8.1.4', instance)
|
||||||
|
|
||||||
def get_server_launch_cmd(self):
|
def get_server_launch_cmd(self):
|
||||||
'''Return the commands to launch the server side.'''
|
'''Return the commands to launch the server side.'''
|
||||||
@ -201,8 +201,9 @@ class NuttcpTool(PerfTool):
|
|||||||
else:
|
else:
|
||||||
# TCP output:
|
# TCP output:
|
||||||
# megabytes=1083.4252 real_seconds=10.04 rate_Mbps=905.5953 tx_cpu=3 rx_cpu=19
|
# megabytes=1083.4252 real_seconds=10.04 rate_Mbps=905.5953 tx_cpu=3 rx_cpu=19
|
||||||
# retrans=0 rtt_ms=0.55
|
# retrans=0 cwnd=3202 rtt_ms=0.55
|
||||||
re_tcp = r'rate_Mbps=([\d\.]*) tx_cpu=\d* rx_cpu=\d* retrans=(\d*) rtt_ms=([\d\.]*)'
|
re_tcp = \
|
||||||
|
r'rate_Mbps=([\d\.]*) tx_cpu=\d* rx_cpu=\d* retrans=(\d*) cwnd=\d* rtt_ms=([\d\.]*)'
|
||||||
match = re.search(re_tcp, cmd_out)
|
match = re.search(re_tcp, cmd_out)
|
||||||
if match:
|
if match:
|
||||||
rate_mbps = float(match.group(1))
|
rate_mbps = float(match.group(1))
|
||||||
|
BIN
vmtp/tools/iperf
BIN
vmtp/tools/iperf
Binary file not shown.
BIN
vmtp/tools/iperf-2.0.9
Executable file
BIN
vmtp/tools/iperf-2.0.9
Executable file
Binary file not shown.
Binary file not shown.
BIN
vmtp/tools/nuttcp-8.1.4
Executable file
BIN
vmtp/tools/nuttcp-8.1.4
Executable file
Binary file not shown.
11
vmtp/vmtp.py
11
vmtp/vmtp.py
@ -580,7 +580,8 @@ def gen_report_data(proto, result):
|
|||||||
if proto in ['TCP', 'Upload', 'Download']:
|
if proto in ['TCP', 'Upload', 'Download']:
|
||||||
tcp_test_count = tcp_test_count + 1
|
tcp_test_count = tcp_test_count + 1
|
||||||
retval['tp_kbps'] += item['throughput_kbps']
|
retval['tp_kbps'] += item['throughput_kbps']
|
||||||
retval['rtt_ms'] += item['rtt_ms']
|
# iperf doesn't support to have rtt_ms
|
||||||
|
retval['rtt_ms'] += item.get('rtt_ms', 0)
|
||||||
elif proto == 'UDP' or proto == 'Multicast':
|
elif proto == 'UDP' or proto == 'Multicast':
|
||||||
retval[item['pkt_size']]['tp_kbps'] = item['throughput_kbps']
|
retval[item['pkt_size']]['tp_kbps'] = item['throughput_kbps']
|
||||||
retval[item['pkt_size']]['loss_rate'] = item['loss_rate']
|
retval[item['pkt_size']]['loss_rate'] = item['loss_rate']
|
||||||
@ -601,8 +602,12 @@ def gen_report_data(proto, result):
|
|||||||
retval['rtt avg/min/max/stddev msec'] = pkt_size_results
|
retval['rtt avg/min/max/stddev msec'] = pkt_size_results
|
||||||
|
|
||||||
if proto in ['TCP', 'Upload', 'Download']:
|
if proto in ['TCP', 'Upload', 'Download']:
|
||||||
for key in retval:
|
for key in retval.keys():
|
||||||
retval[key] = '{0:n}'.format(retval[key] / tcp_test_count)
|
if retval[key]:
|
||||||
|
retval[key] = '{0:n}'.format(retval[key] / tcp_test_count)
|
||||||
|
else:
|
||||||
|
retval.pop(key)
|
||||||
|
|
||||||
except Exception:
|
except Exception:
|
||||||
retval = "ERROR! Check JSON outputs for more details."
|
retval = "ERROR! Check JSON outputs for more details."
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
|
Loading…
Reference in New Issue
Block a user