fix tiles: - Change cpu to %CPU - Change normalize to thr/%CPU write version/description infomation in result file.
Signed-off-by: Amos Kong <ak...@redhat.com> --- client/virt/tests/netperf.py | 24 +++++++++++++++++++----- 1 files changed, 19 insertions(+), 5 deletions(-) diff --git a/client/virt/tests/netperf.py b/client/virt/tests/netperf.py index bc4e436..058f3fc 100644 --- a/client/virt/tests/netperf.py +++ b/client/virt/tests/netperf.py @@ -79,14 +79,15 @@ def run_netperf(test, params, env): sessions=params.get('sessions'), sizes_rr=params.get('sizes_rr'), sizes=params.get('sizes'), - protocols=params.get('protocols')) + protocols=params.get('protocols'), + ver_cmd=params.get('ver_cmd', "rpm -q qemu-kvm")) def start_test(server, server_ctl, host, client, resultsdir, l=60, sessions_rr="50 100 250 500", sessions="1 2 4", sizes_rr="64 256 512 1024 2048", sizes="64 256 512 1024 2048 4096", - protocols="TCP_STREAM TCP_MAERTS TCP_RR"): + protocols="TCP_STREAM TCP_MAERTS TCP_RR", ver_cmd=None): """ Start to test with different kind of configurations @@ -116,12 +117,25 @@ def start_test(server, server_ctl, host, client, resultsdir, l=60, return thu fd = open("%s/netperf-result.RHS" % resultsdir, "w") + fd.write("#ver# %s\n#ver# host kernel: %s\n#ver# guest kernel:%s\n" % ( + commands.getoutput(ver_cmd), + os.uname()[2], ssh_cmd(server_ctl, "uname -r"))) + desc = """#desc# The tests are %s seconds sessions of "Netperf". 'throughput' was taken from netperf's report. +#desc# other measurements were taken on the host. +#desc# How to read the results: +#desc# - The Throughput is measured in Mbit/sec. +#desc# - io_exit: io exits of KVM. +#desc# - irq_inj: irq injections of KVM. +#desc# +""" % (l) + fd.write(desc) + for protocol in protocols.split(): logging.info(protocol) - fd.write(protocol+ "\n") + fd.write("Category:" + protocol+ "\n") row = "%5s|%8s|%10s|%6s|%9s|%10s|%10s|%12s|%12s|%9s|%8s|%8s|%10s|%10s" \ - "|%11s|%10s" % ("size", "sessions", "throughput", "cpu", - "normalize", "#tx-pkts", "#rx-pkts", "#tx-byts", "#rx-byts", + "|%11s|%10s" % ("size", "sessions", "throughput", "%CPU", + "thr/%CPU", "#tx-pkts", "#rx-pkts", "#tx-byts", "#rx-byts", "#re-trans", "#tx-intr", "#rx-intr", "#io_exit", "#irq_inj", "#tpkt/#exit", "#rpkt/#irq") logging.info(row) _______________________________________________ Autotest mailing list Autotest@test.kernel.org http://test.kernel.org/cgi-bin/mailman/listinfo/autotest