From: "Ma, LihongX" <lihongx.ma@intel.com>
To: "dts@dpdk.org" <dts@dpdk.org>
Subject: Re: [dts] [PATCH V1] tests/perf_virtio_user: fix issue of the json per patch result report in output
Date: Mon, 24 Feb 2020 09:23:32 +0000 [thread overview]
Message-ID: <b4f8195e27f149eeb7ee44428f3b6d87@intel.com> (raw)
In-Reply-To: <1582509231-30503-1-git-send-email-lihongx.ma@intel.com>
Tested-by:ma,lihong<lihongx.ma@intel.com>
Regards,
Ma,lihong
-----Original Message-----
From: Ma, LihongX
Sent: Monday, February 24, 2020 9:54 AM
To: dts@dpdk.org
Cc: Ma, LihongX <lihongx.ma@intel.com>
Subject: [dts][PATCH V1] tests/perf_virtio_user: fix issue of the json per patch result report in output
Signed-off-by: lihong <lihongx.ma@intel.com>
---
tests/TestSuite_perf_virtio_user_loopback.py | 12 ++++++------
tests/TestSuite_perf_virtio_user_pvp.py | 15 +++++++--------
2 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/tests/TestSuite_perf_virtio_user_loopback.py b/tests/TestSuite_perf_virtio_user_loopback.py
index 15bc54c..0fb97dd 100644
--- a/tests/TestSuite_perf_virtio_user_loopback.py
+++ b/tests/TestSuite_perf_virtio_user_loopback.py
@@ -71,6 +71,7 @@ class TestPerfVirtioUserLoopback(TestCase):
self.vhost = self.dut.new_session(suite="vhost")
self.virtio_user = self.dut.new_session(suite="virtio-user")
self.save_result_flag = True
+ self.json_obj = dict()
def set_up(self):
"""
@@ -237,9 +238,8 @@ class TestPerfVirtioUserLoopback(TestCase):
self.nic+_single_core_perf.json in output folder
if self.save_result_flag is True
'''
- json_obj = dict()
case_name = self.running_case
- json_obj[case_name] = list()
+ self.json_obj[case_name] = list()
status_result = []
for frame_size in self.test_parameters.keys():
for nb_desc in self.test_parameters[frame_size]:
@@ -268,12 +268,12 @@ class TestPerfVirtioUserLoopback(TestCase):
row_dict0['performance'].append(row_dict1)
row_dict0['parameters'].append(row_dict2)
row_dict0['parameters'].append(row_dict3)
- json_obj[case_name].append(row_dict0)
+ self.json_obj[case_name].append(row_dict0)
status_result.append(row_dict0['status'])
with open(os.path.join(rst.path2Result,
- '{0:s}_vhost_loopback_performance_virtio_user.json'.format(
- self.nic)), 'w') as fp:
- json.dump(json_obj, fp)
+ '{0:s}_{1}.json'.format(
+ self.nic, self.suite_name)), 'w') as fp:
+ json.dump(self.json_obj, fp)
self.verify("Fail" not in status_result, "Exceeded Gap")
def test_perf_loopback_packed_ring_inorder_mergeable(self):
diff --git a/tests/TestSuite_perf_virtio_user_pvp.py b/tests/TestSuite_perf_virtio_user_pvp.py
index d49bd19..2073426 100644
--- a/tests/TestSuite_perf_virtio_user_pvp.py
+++ b/tests/TestSuite_perf_virtio_user_pvp.py
@@ -42,7 +42,6 @@ from test_case import TestCase from packet import Packet from settings import UPDATE_EXPECTED, load_global_setting from copy import deepcopy -from prettytable import PrettyTable
class TestVirtioSingleCorePerf(TestCase):
@@ -63,6 +62,7 @@ class TestVirtioSingleCorePerf(TestCase):
self.save_result_flag = True
socket_num = len(set([int(core['socket']) for core in self.dut.cores]))
self.socket_mem = ','.join(['1024']*socket_num)
+ self.json_obj = dict()
def set_up(self):
"""
@@ -332,12 +332,11 @@ class TestVirtioSingleCorePerf(TestCase):
def save_result(self, data):
'''
Saves the test results as a separated file named with
- self.nic+_single_core_perf.json in output folder
+ self.nic+_perf_virtio_user_pvp.json in output folder
if self.save_result_flag is True
'''
- json_obj = dict()
case_name = self.running_case
- json_obj[case_name] = list()
+ self.json_obj[case_name] = list()
status_result = []
for frame_size in self.test_parameters.keys():
for nb_desc in self.test_parameters[frame_size]:
@@ -366,12 +365,12 @@ class TestVirtioSingleCorePerf(TestCase):
row_dict0['performance'].append(row_dict1)
row_dict0['parameters'].append(row_dict2)
row_dict0['parameters'].append(row_dict3)
- json_obj[case_name].append(row_dict0)
+ self.json_obj[case_name].append(row_dict0)
status_result.append(row_dict0['status'])
with open(os.path.join(rst.path2Result,
- '{0:s}_single_core_perf.json'.format(
- self.nic)), 'w') as fp:
- json.dump(json_obj, fp)
+ '{0:s}_{1}.json'.format(
+ self.nic, self.suite_name)), 'w') as fp:
+ json.dump(self.json_obj, fp)
self.verify("Fail" not in status_result, "Exceeded Gap")
def tear_down(self):
--
2.7.4
next prev parent reply other threads:[~2020-02-24 9:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-24 1:53 lihong
2020-02-24 9:23 ` Ma, LihongX [this message]
2020-02-25 1:29 ` Tu, Lijuan
2020-02-25 1:29 ` Tu, Lijuan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b4f8195e27f149eeb7ee44428f3b6d87@intel.com \
--to=lihongx.ma@intel.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).