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 03085A052B; Wed, 29 Jul 2020 09:53:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E21351BFFD; Wed, 29 Jul 2020 09:53:15 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 335ABF04 for ; Wed, 29 Jul 2020 09:53:14 +0200 (CEST) IronPort-SDR: OdTLqV8vc/nj+bHHGNKN2RIMfzfy7/VdTM2BEKanq43Yv0P/4W+ZZNmyucdu0hu8ClrSaW5FiF ukMoDDD5cqZA== X-IronPort-AV: E=McAfee;i="6000,8403,9696"; a="236239846" X-IronPort-AV: E=Sophos;i="5.75,409,1589266800"; d="scan'208";a="236239846" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2020 00:53:13 -0700 IronPort-SDR: 9MSBMQGofj2XUlg0vDVVHec4QVfQ/3Diu3mXgIrP2nDLB5ILLvv08PkDkwrhnWMqfJHbr6aOVq 6orRN1WoCEMg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,409,1589266800"; d="scan'208";a="364774162" Received: from unknown (HELO localhost.localdomain) ([10.240.183.80]) by orsmga001.jf.intel.com with ESMTP; 29 Jul 2020 00:53:11 -0700 From: "Jiang, YuX" To: dts@dpdk.org Cc: "Jiang,yu" , Jiang@dpdk.org Date: Wed, 29 Jul 2020 15:54:36 +0800 Message-Id: <20200729075436.21401-1-yux.jiang@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1] tests/crypto_perf_cryptodev_perf: optimize parse 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" From: "Jiang,yu" Optimize the output of perf test results log Signed-off-by: Jiang,yu --- tests/TestSuite_crypto_perf_cryptodev_perf.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/TestSuite_crypto_perf_cryptodev_perf.py b/tests/TestSuite_crypto_perf_cryptodev_perf.py index e1780f5..fb9f2e0 100644 --- a/tests/TestSuite_crypto_perf_cryptodev_perf.py +++ b/tests/TestSuite_crypto_perf_cryptodev_perf.py @@ -268,14 +268,15 @@ class PerfTestsCryptodev(TestCase): if lines[line_index].startswith(" lcore id"): self.logger.debug("data output line from: " + str(line_index)) break + data_line = line_index - 2 results = [] pattern = re.compile(r'\s+') - for line in lines[line_index:]: + for line in lines[data_line:-1]: print(line) result = {} result_list = pattern.split(line.strip(" ")) - if result_list[0] == "lcore id" or result_list[0] == "lcore" or not result_list[0]: + if len(result_list) != 10 or result_list[0] == "lcore" or not result_list[0]: continue result["lcore_id"] = int(result_list[0]) result["buf_size"] = int(result_list[1]) -- 2.7.4