提交 1adb764a 编写于 作者: X Xu Han 提交者: GitHub

Merge pull request #1074 from quanwenli/wenli

Keep consistent report with x86 for ppc platform.
......@@ -13,7 +13,6 @@ from virttest import utils_misc
from virttest import utils_net
from virttest import remote
from virttest import data_dir
from virttest import arch
_netserver_started = False
......@@ -302,11 +301,7 @@ def start_test(server, server_ctl, host, clients, resultsdir, test_duration=60,
record_list = ['size', 'sessions', 'throughput', 'trans.rate', 'CPU',
'thr_per_CPU', 'rx_pkts', 'tx_pkts', 'rx_byts', 'tx_byts',
're_pkts', 'rpkt_per_irq', 'tpkt_per_exit']
if arch.ARCH in ('ppc64', 'ppc64le'):
record_list.append('exits')
else:
record_list.extend(['irq_injs', 'io_exits'])
're_pkts', 'exits', 'tpkt_per_exit']
for i in range(int(params.get("queues", 0))):
record_list.append('rx_intr_%s' % i)
......@@ -356,17 +351,9 @@ def start_test(server, server_ctl, host, clients, resultsdir, test_duration=60,
thu = float(ret['thu'])
cpu = 100 - float(ret['mpstat'].split()[mpstat_index])
normal = thu / cpu
if arch.ARCH in ('ppc64', 'ppc64le'):
if ret.get('tx_pkts') and ret.get('exits'):
ret['tpkt_per_exits'] = float(
ret['tx_pkts']) / float(ret['exits'])
else:
if ret.get('rx_pkts') and ret.get('irq_injs'):
ret['rpkt_per_irq'] = float(
ret['rx_pkts']) / float(ret['irq_injs'])
if ret.get('tx_pkts') and ret.get('io_exits'):
ret['tpkt_per_exit'] = float(
ret['tx_pkts']) / float(ret['io_exits'])
if ret.get('tx_pkt') and ret.get('exits'):
ret['tpkt_per_exit'] = float
(ret['tx_pkts']) / float(ret['exits'])
ret['size'] = int(i)
ret['sessions'] = int(j)
......@@ -536,18 +523,9 @@ def launch_client(sessions, server, server_ctl, host, clients, l, nf_args,
state_list.append('intr')
state_list.append(ninit)
if arch.ARCH in ('ppc64', 'ppc64le'):
exits = int(ssh_cmd(host, "cat /sys/kernel/debug/kvm/exits"))
state_list.append('exits')
state_list.append(exits)
else:
io_exits = int(ssh_cmd(host, "cat /sys/kernel/debug/kvm/io_exits"))
irq_injs = int(
ssh_cmd(host, "cat /sys/kernel/debug/kvm/irq_injections"))
state_list.append('io_exits')
state_list.append(io_exits)
state_list.append('irq_injs')
state_list.append(irq_injs)
exits = int(ssh_cmd(host, "cat /sys/kernel/debug/kvm/exits"))
state_list.append('exits')
state_list.append(exits)
return state_list
......@@ -555,8 +533,7 @@ def launch_client(sessions, server, server_ctl, host, clients, l, nf_args,
cmd = ""
fname = "/tmp/netperf.%s.nf" % pid
if numa_enable:
output = ssh_cmd(client_s, "numactl --hardware")
n = re.findall(r"node (\d+) cpus:", output)[-1]
n = abs(int(params.get("numa_node"))) - 1
cmd += "numactl --cpunodebind=%s --membind=%s " % (n, n)
cmd += "/tmp/netperf_agent.py %d %s -D 1 -H %s -l %s %s" % (i,
client_path, server, int(l) * 1.5, nf_args)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册