From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 084EAA034F; Wed, 31 Mar 2021 04:18:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 83CAE140DF9; Wed, 31 Mar 2021 04:18:03 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id F0D084069E for ; Wed, 31 Mar 2021 04:18:01 +0200 (CEST) IronPort-SDR: agqGCugkmxg/1FK3jUNXLUo6CYmS881tqym/2Bk3DlRpSiw5KsAnfpOC3B1yYubO6GG3/Xf+Hx DbbtxzH7Hocw== X-IronPort-AV: E=McAfee;i="6000,8403,9939"; a="179027931" X-IronPort-AV: E=Sophos;i="5.81,291,1610438400"; d="scan'208";a="179027931" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2021 19:18:00 -0700 IronPort-SDR: xVARVW6WTH9lSjrfvDORrnXWk+qqydjG8tk4dtHgj/BvKWlQzRPR9kH6nqdwp85aJ5/3Z0soaP Bj9QihLTDdog== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,291,1610438400"; d="scan'208";a="445432396" Received: from dpdk-icelake-perf.sh.intel.com ([10.67.118.199]) by fmsmga002.fm.intel.com with ESMTP; 30 Mar 2021 19:17:58 -0700 From: Lijuan Tu To: dliu@iol.unh.edu, ohilyard@iol.unh.edu, alialnu@nvidia.com Cc: dts@dpdk.org, Lijuan Tu Date: Wed, 31 Mar 2021 10:16:56 +0000 Message-Id: <20210331101659.506185-4-lijuan.tu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210331101659.506185-1-lijuan.tu@intel.com> References: <20210331101659.506185-1-lijuan.tu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dts] [v3 3/6] tests/nic_single_core_perf: revise rst table X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 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" add more info in rst table, and rename headers to reduce width. before: +----------+------------+---------+------------+--------+---------------------+-----------------------+ | Fwd_core | Frame Size | TXD/RXD | Throughput | Rate | Expected Throughput | Throughput Difference | +==========+============+=========+============+========+=====================+=======================+ | 1C/1T | 64 | 512 | 9.842 Mpps | 3.307% | 0.000 Mpps | 9.842 Mpps | +----------+------------+---------+------------+--------+---------------------+-----------------------+ after: +----------+------------+---------+-----------+--------+---------------+-----------------+--------+ | Fwd_core | Frame Size | TXD/RXD | Real-Mpps | Rate | Expected-Mpps | Real - Expected | Status | +==========+============+=========+===========+========+===============+=================+========+ | 1C/1T | 64 | 512 | 9.864 | 3.314% | 0 | 9.864 | PASS | +----------+------------+---------+-----------+--------+---------------+-----------------+--------+ Signed-off-by: Lijuan Tu --- tests/TestSuite_nic_single_core_perf.py | 28 +++++++++++++------------ 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/tests/TestSuite_nic_single_core_perf.py b/tests/TestSuite_nic_single_core_perf.py index a0a257dd..095b508a 100644 --- a/tests/TestSuite_nic_single_core_perf.py +++ b/tests/TestSuite_nic_single_core_perf.py @@ -120,8 +120,8 @@ class TestNicSingleCorePerf(TestCase): self.gap = self.get_suite_cfg()['accepted_tolerance'] # header to print test result table - self.table_header = ['Fwd_core', 'Frame Size', 'TXD/RXD', 'Throughput', 'Rate', - 'Expected Throughput', 'Throughput Difference'] + self.table_header = ['Fwd_core', 'Frame Size', 'TXD/RXD', 'Real-Mpps', 'Rate', + 'Expected-Mpps', 'Real - Expected', 'Status'] self.test_result = {} def flows(self): @@ -327,15 +327,17 @@ class TestNicSingleCorePerf(TestCase): ret_data[header[0]] = fwd_config ret_data[header[1]] = frame_size ret_data[header[2]] = nb_desc - ret_data[header[3]] = "{:.3f} Mpps".format( - self.throughput[fwd_config][frame_size][nb_desc]) - ret_data[header[4]] = "{:.3f}%".format( - self.throughput[fwd_config][frame_size][nb_desc] * 100 / wirespeed) - ret_data[header[5]] = "{:.3f} Mpps".format( - self.expected_throughput[fwd_config][frame_size][nb_desc]) - ret_data[header[6]] = "{:.3f} Mpps".format( - self.throughput[fwd_config][frame_size][nb_desc] - - self.expected_throughput[fwd_config][frame_size][nb_desc]) + _real = self.throughput[fwd_config][frame_size][nb_desc] + _exp = self.expected_throughput[fwd_config][frame_size][nb_desc] + ret_data[header[3]] = "{:.3f}".format(_real) + ret_data[header[4]] = "{:.3f}%".format(_real * 100 / wirespeed) + ret_data[header[5]] = "{:.3f}".format(_exp) + delta = _real - _exp + ret_data[header[6]] = "{:.3f}".format(delta) + if delta > -self.gap: + ret_data[header[7]] = 'PASS' + else: + ret_data[header[7]] = 'FAIL' ret_datas[frame_size][nb_desc] = deepcopy(ret_data) self.test_result[fwd_config] = deepcopy(ret_datas) @@ -374,8 +376,8 @@ class TestNicSingleCorePerf(TestCase): row_dict0 = dict() row_dict0['performance'] = list() row_dict0['parameters'] = list() - result_throughput = float(row_in['Throughput'].split()[0]) - expected_throughput = float(row_in['Expected Throughput'].split()[0]) + result_throughput = float(row_in['Real-Mpps']) + expected_throughput = float(row_in['Expected-Mpps']) # delta value and accepted tolerance in percentage delta = result_throughput - expected_throughput if delta > -self.gap: -- 2.25.1