From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id E76C747CE for ; Fri, 12 May 2017 05:03:46 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 May 2017 20:03:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,327,1491289200"; d="scan'208";a="99062491" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga005.jf.intel.com with ESMTP; 11 May 2017 20:03:45 -0700 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 11 May 2017 20:03:44 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 11 May 2017 20:03:44 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.246]) by SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0319.002; Fri, 12 May 2017 11:03:42 +0800 From: "Xu, Qian Q" To: "Pei, Yulong" , "dts@dpdk.org" CC: "Liu, Yong" , "Xu, Qian Q" Thread-Topic: [PATCH v3 2/2] tests: support html report for single core performance test Thread-Index: AQHSysaAEdoRCcylu02Sa6/iEV7xtKHv/JbQ Date: Fri, 12 May 2017 03:03:42 +0000 Message-ID: <82F45D86ADE5454A95A89742C8D1410E3B625C51@shsmsx102.ccr.corp.intel.com> References: <86228AFD5BCD8E4EBFD2B90117B5E81E62DCEDD4@SHSMSX103.ccr.corp.intel.com> <1494472438-128286-1-git-send-email-yulong.pei@intel.com> <1494472438-128286-2-git-send-email-yulong.pei@intel.com> In-Reply-To: <1494472438-128286-2-git-send-email-yulong.pei@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 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 v3 2/2] tests: support html report for single core performance test 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: , X-List-Received-Date: Fri, 12 May 2017 03:03:47 -0000 Yulong Some comments:=20 1. Could we add different RXD/TXD check? 512,1024,2048,4096 2. Maybe we can only keep 64, 72 Bytes for daily test, only in release per= formance test, we need test all packet sizes. 3. Do you cover 2ports(40G) test case for the single core?=20 As to the single core test 1. If it's for per patch set performance test, I think 64/72 packet size i= s enough, different RXD/TXD configurations.=20 2. If to figure out the single core performance, we need do a full check. = Maybe not need automate these, but need check full=20 FVL40Gx2, NNT10Gx4, FVL10Gx4 NDR--zero packet loss, which RXD/TXD is best recommended.=20 PDR--0.5% packet loss, which RXD/TXD is best recommended.=20 Allowed drops 1q/port, 2q/port for FVL40G, NNT10G for both NDR and Allowed drops > -----Original Message----- > From: Pei, Yulong > Sent: Thursday, May 11, 2017 11:14 AM > To: dts@dpdk.org > Cc: Xu, Qian Q ; Liu, Yong > Subject: [PATCH v3 2/2] tests: support html report for single core perfor= mance > test >=20 > support html report for single core performance test. >=20 > Signed-off-by: Yulong Pei > --- > tests/TestSuite_pmd.py | 70 > ++++++++++++++++++++++++++++++++++++++++++-------- > 1 file changed, 60 insertions(+), 10 deletions(-) >=20 > diff --git a/tests/TestSuite_pmd.py b/tests/TestSuite_pmd.py index > 2d5b485..8f4b22c 100644 > --- a/tests/TestSuite_pmd.py > +++ b/tests/TestSuite_pmd.py > @@ -37,12 +37,20 @@ Test userland 10Gb PMD import utils import re impo= rt > time > +import os > + > from test_case import TestCase > from time import sleep > from settings import HEADER_SIZE > from pmd_output import PmdOutput > from etgen import IxiaPacketGenerator >=20 > +from settings import FOLDERS > +from system_info import SystemInfo > +import perf_report > +from datetime import datetime > + > + > class TestPmd(TestCase,IxiaPacketGenerator): >=20 > def set_up_all(self): > @@ -53,7 +61,7 @@ class TestPmd(TestCase,IxiaPacketGenerator): > """ > self.tester.extend_external_packet_generator(TestPmd, self) >=20 > - self.frame_sizes =3D [64, 65, 128, 256, 512, 1024, 1280, 1518] > + self.frame_sizes =3D [64, 72, 128, 256, 512, 1024, 1280, 1518] >=20 > self.rxfreet_values =3D [0, 8, 16, 32, 64, 128] >=20 > @@ -62,10 +70,11 @@ class TestPmd(TestCase,IxiaPacketGenerator): >=20 > self.table_header =3D ['Frame Size'] > for test_cycle in self.test_cycles: > - self.table_header.append("app") > self.table_header.append("%s Mpps" % test_cycle['cores']) > self.table_header.append("% linerate") >=20 > + self.perf_results =3D {'header': [], 'data': []} > + > self.blacklist =3D "" >=20 > # Update config file and rebuild to get best perf on FVL @@ -75,= 6 +84,19 > @@ class TestPmd(TestCase,IxiaPacketGenerator): > # Based on h/w type, choose how many ports to use > self.dut_ports =3D self.dut.get_ports() >=20 > + # Get dut system information > + port_num =3D self.dut_ports[0] > + pci_device_id =3D self.dut.ports_info[port_num]['pci'] > + ori_driver =3D self.dut.ports_info[port_num]['port'].get_nic_dri= ver() > + self.dut.ports_info[port_num]['port'].bind_driver() > + > + sut =3D SystemInfo(self.dut, pci_device_id) > + self.system_info =3D sut.get_system_info() > + self.nic_info =3D sut.get_nic_info() > + > + self.dut.ports_info[port_num]['port'].bind_driver(ori_driver) > + ###### > + > self.headers_size =3D HEADER_SIZE['eth'] + HEADER_SIZE[ > 'ip'] + HEADER_SIZE['tcp'] >=20 > @@ -92,12 +114,38 @@ class TestPmd(TestCase,IxiaPacketGenerator): > """ > Run single core performance > """ > + self.perf_results['header'] =3D [] > + self.perf_results['data'] =3D [] > + > if len(self.dut_ports) >=3D 4: > self.pmd_performance_4ports() > else: > self.verify(len(self.dut_ports) >=3D 2, "Insufficient ports = for 2 ports > performance test") > self.pmd_performance_2ports() >=20 > + #To replace False to True for if condition to send the result by= email. > + if False: > + #it need place dpdk source git repo under dep directory. > + repo_dir =3D FOLDERS["Depends"] + r'/dpdk' > + git_info =3D perf_report.get_dpdk_git_info(repo_dir) > + self.verify(git_info is not None, "get dpdk git repo > + error") > + > + tpl_path =3D FOLDERS["NicDriver"] + r'/perf_report.jinja' > + file_tpl =3D os.path.abspath(tpl_path) > + html_msg =3D perf_report.generate_html_report(file_tpl, \ > + perf_data =3D se= lf.perf_results['data'], \ > + git_info =3D git= _info, \ > + nic_info =3D sel= f.nic_info, \ > + system_info =3D = self.system_info) > + self.verify(html_msg is not None, "generate html report > + error") > + > + subject =3D "Single core performance test with %d ports %s -= - %s" % \ > + (len(self.dut_ports), self.nic, datetime.now().str= ftime('%Y-%m- > %d %H:%M')) > + sender =3D 'xxxxxx@intel.com' > + mailto =3D ['xxxxxx@intel.com'] > + smtp_server =3D 'smtp.intel.com' > + perf_report.send_html_report(sender, mailto, subject, > + html_msg, smtp_server) > + > def pmd_performance_4ports(self): > """ > PMD Performance Benchmarking with 4 ports. > @@ -159,8 +207,9 @@ class TestPmd(TestCase,IxiaPacketGenerator): > _, pps =3D self.tester.traffic_generator_throughput(tgen= _input, > rate_percent=3D100, delay=3D60) >=20 > pps /=3D 1000000.0 > - test_cycle['Mpps'][frame_size] =3D pps > - test_cycle['pct'][frame_size] =3D pps * 100 / wirespeed > + pct =3D pps * 100 / wirespeed > + test_cycle['Mpps'][frame_size] =3D float('%.3f' % pps) > + test_cycle['pct'][frame_size] =3D float('%.3f' % pct) >=20 > self.dut.send_expect("stop", "testpmd> ") > self.dut.send_expect("quit", "# ", 30) @@ -173,16 +222,16 @@= class > TestPmd(TestCase,IxiaPacketGenerator): >=20 > # Print results > self.result_table_create(self.table_header) > + self.perf_results['header'] =3D self.table_header >=20 > for frame_size in self.frame_sizes: > table_row =3D [frame_size] > - > for test_cycle in self.test_cycles: > - table_row.append("testpmd") > table_row.append(test_cycle['Mpps'][frame_size]) > table_row.append(test_cycle['pct'][frame_size]) >=20 > self.result_table_add(table_row) > + self.perf_results['data'].append(table_row) >=20 > self.result_table_print() >=20 > @@ -241,10 +290,10 @@ class TestPmd(TestCase,IxiaPacketGenerator): > # run traffic generator > _, pps =3D self.tester.traffic_generator_throughput(tgen= _input, > rate_percent=3D100, delay=3D60) >=20 > - > pps /=3D 1000000.0 > - test_cycle['Mpps'][frame_size] =3D pps > - test_cycle['pct'][frame_size] =3D pps * 100 / wirespeed > + pct =3D pps * 100 / wirespeed > + test_cycle['Mpps'][frame_size] =3D float('%.3f' % pps) > + test_cycle['pct'][frame_size] =3D float('%.3f' % pct) >=20 > self.dut.send_expect("stop", "testpmd> ") > self.dut.send_expect("quit", "# ", 30) @@ -257,14 +306,15 @@= class > TestPmd(TestCase,IxiaPacketGenerator): >=20 > # Print results > self.result_table_create(self.table_header) > + self.perf_results['header'] =3D self.table_header > for frame_size in self.frame_sizes: > table_row =3D [frame_size] > for test_cycle in self.test_cycles: > - table_row.append("testpmd") > table_row.append(test_cycle['Mpps'][frame_size]) > table_row.append(test_cycle['pct'][frame_size]) >=20 > self.result_table_add(table_row) > + self.perf_results['data'].append(table_row) >=20 > self.result_table_print() >=20 > -- > 2.5.0