From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0E755A0524; Tue, 25 Feb 2020 02:29:14 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 061C11BE85; Tue, 25 Feb 2020 02:29:14 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 816CE2C39 for ; Tue, 25 Feb 2020 02:29:12 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Feb 2020 17:29:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,482,1574150400"; d="scan'208";a="260533927" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga004.fm.intel.com with ESMTP; 24 Feb 2020 17:29:11 -0800 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 24 Feb 2020 17:29:11 -0800 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 24 Feb 2020 17:29:08 -0800 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 24 Feb 2020 17:29:07 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.222]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.46]) with mapi id 14.03.0439.000; Tue, 25 Feb 2020 09:29:06 +0800 From: "Tu, Lijuan" To: "Ma, LihongX" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH V1] tests/perf_virtio_user: fix issue of the json per patch result report in output Thread-Index: AQHV6vQpew7AaMswKECzB53hxGosA6grIAGA Date: Tue, 25 Feb 2020 01:29:05 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBCDBB2@SHSMSX101.ccr.corp.intel.com> References: <1582509231-30503-1-git-send-email-lihongx.ma@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1] tests/perf_virtio_user: fix issue of the json per patch result report in output X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Ma, LihongX > Sent: Monday, February 24, 2020 5:24 PM > To: dts@dpdk.org > Subject: Re: [dts] [PATCH V1] tests/perf_virtio_user: fix issue of the js= on per > patch result report in output >=20 > Tested-by:ma,lihong >=20 > Regards, > Ma,lihong >=20 >=20 > -----Original Message----- > From: Ma, LihongX > Sent: Monday, February 24, 2020 9:54 AM > To: dts@dpdk.org > Cc: Ma, LihongX > Subject: [dts][PATCH V1] tests/perf_virtio_user: fix issue of the json pe= r patch > result report in output >=20 > Signed-off-by: lihong > --- > tests/TestSuite_perf_virtio_user_loopback.py | 12 ++++++------ > tests/TestSuite_perf_virtio_user_pvp.py | 15 +++++++-------- > 2 files changed, 13 insertions(+), 14 deletions(-) >=20 > 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 =3D self.dut.new_session(suite=3D"vhost") > self.virtio_user =3D self.dut.new_session(suite=3D"virtio-user") > self.save_result_flag =3D True > + self.json_obj =3D dict() >=20 > 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 =3D dict() > case_name =3D self.running_case > - json_obj[case_name] =3D list() > + self.json_obj[case_name] =3D list() > status_result =3D [] > 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") >=20 > 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 >=20 >=20 > class TestVirtioSingleCorePerf(TestCase): > @@ -63,6 +62,7 @@ class TestVirtioSingleCorePerf(TestCase): > self.save_result_flag =3D True > socket_num =3D len(set([int(core['socket']) for core in self.dut= .cores])) > self.socket_mem =3D ','.join(['1024']*socket_num) > + self.json_obj =3D dict() >=20 > 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 =3D dict() > case_name =3D self.running_case > - json_obj[case_name] =3D list() > + self.json_obj[case_name] =3D list() > status_result =3D [] > 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") >=20 > def tear_down(self): > -- > 2.7.4