From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id CF07C5A72 for ; Thu, 31 Dec 2015 09:26:06 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 31 Dec 2015 00:26:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,503,1444719600"; d="scan'208";a="881489353" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 31 Dec 2015 00:26:05 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id tBV8Q3i1010695; Thu, 31 Dec 2015 16:26:03 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id tBV8Q1ZM026089; Thu, 31 Dec 2015 16:26:03 +0800 Received: (from hengdinx@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id tBV8Q1cf026085; Thu, 31 Dec 2015 16:26:01 +0800 From: Ding Heng To: dts@dpdk.org Date: Thu, 31 Dec 2015 16:25:54 +0800 Message-Id: <1451550354-26047-2-git-send-email-hengx.ding@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1451550354-26047-1-git-send-email-hengx.ding@intel.com> References: <1451550354-26047-1-git-send-email-hengx.ding@intel.com> Cc: Ding Heng Subject: [dts] [PATCH 2/2] l3fwd: delete plot funtions 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: Thu, 31 Dec 2015 08:26:07 -0000 Signed-off-by: Ding Heng diff --git a/tests/TestSuite_l3fwd.py b/tests/TestSuite_l3fwd.py index e785b8b..63d6acd 100644 --- a/tests/TestSuite_l3fwd.py +++ b/tests/TestSuite_l3fwd.py @@ -95,7 +95,7 @@ class TestL3fwd(TestCase,IxiaPacketGenerator): "{IPv4(13,101,0,0), 24, P3}", ] - frame_sizes = [64, 128, 256, 512, 2048] # 65, 128 + frame_sizes = [64]#, 128, 256, 512, 2048] # 65, 128 methods = ['lpm', 'exact'] # @@ -121,160 +121,6 @@ class TestL3fwd(TestCase,IxiaPacketGenerator): # Test cases. # - def plot_4_ports(self): - - data = self.l3fwd_test_results['data'] - - # Create a plot for each number of queues for frame size and mode comparison - cores = '1S/1C/1T' - for queues in TestL3fwd.queues_4_ports: - ydata = [] - lpm_ydata = [] - exact_ydata = [] - for frame_size in TestL3fwd.frame_sizes: - for row in data: - if row[1] * 4 == queues and row[2] == cores and \ - row[0] == frame_size: - if len(TestL3fwd.methods) == 2: - lpm_ydata.append(row[4]) - exact_ydata.append(row[6]) - else: - if 'lpm' in TestL3fwd.methods: - lpm_ydata.append(row[4]) - if 'exact' in TestL3fwd.methods: - exact_ydata.append(row[4]) - - if 'lpm' in TestL3fwd.methods: - ydata.append(lpm_ydata) - if 'exact' in TestL3fwd.methods: - ydata.append(exact_ydata) - - if len(ydata[0]) == 0: - self.logger.warning('No data for plotting 1S/1C/1T') - break - else: - try: - image_path = self.plotting.create_bars_plot( - 'test_perf_l3fwd_4ports_1S_1C_1T_%dRxQ' % queues, - 'LPM & Exact modes, 1S/1C/1T, %d Rx Queues, 4 ports' % queues, - TestL3fwd.frame_sizes, - ydata, - ylabel='% linerate', - legend=TestL3fwd.methods) - - dts.results_plot_print(image_path, 50) - except VerifyFailure as e: - self.logger.error(str(e)) - - # Create a plot for each number of queues for core config and mode comparison - frame_size = TestL3fwd.frame_sizes[0] # Frame size fixed to the first selected - for queues in TestL3fwd.queues_4_ports: - - cores = [] - for row in data: - if row[2] not in cores and \ - row[1] * 4 == queues: - cores.append(row[2]) - - ydata = [] - lpm_ydata = [] - exact_ydata = [] - - for core in cores: - for row in data: - if row[1] * 4 == queues and \ - row[2] == core and \ - row[0] == frame_size: - if len(TestL3fwd.methods) == 2: - lpm_ydata.append(row[4]) - exact_ydata.append(row[6]) - else: - if 'lpm' in TestL3fwd.methods: - lpm_ydata.append(row[4]) - if 'exact' in TestL3fwd.methods: - exact_ydata.append(row[4]) - - if 'lpm' in TestL3fwd.methods: - ydata.append(lpm_ydata) - if 'exact' in TestL3fwd.methods: - ydata.append(exact_ydata) - - try: - image_path = self.plotting.create_bars_plot( - 'test_perf_l3fwd_4ports_%d_%dRxQ' % (frame_size, queues), - 'LPM & Exact modes, %dB, %d Rx Queues, 4 ports' % (frame_size, queues), - TestL3fwd.frame_sizes, - ydata, - ylabel='% linerate', - legend=TestL3fwd.methods) - - dts.results_plot_print(image_path) - except VerifyFailure as e: - self.logger.error(str(e)) - - def plot_2_ports(self): - - data = self.l3fwd_test_results['data'] - - cores = [] - for row in data: - if row[2] not in cores: - cores.append(row[2]) - - # Create a plot for each mode for frame size and cores comparison - for mode in TestL3fwd.methods: - mode_ydata = [] - - for core in cores: - core_ydata = [] - for row in data: - if row[1] == mode and row[2] == core: - core_ydata.append(float(row[4])) - - mode_ydata.append(core_ydata) - - image_path = self.plotting.create_bars_plot( - 'test_perf_l3fwd_2ports_%s' % mode, - 'L3fwd %s mode, 2 ports' % mode, - TestL3fwd.frame_sizes, - mode_ydata, - ylabel='% linerate', - legend=cores) - - dts.results_plot_print(image_path, 50) - - # If testing only one mode, do nothing else. - if len(TestL3fwd.methods) == 1: - return - - # Create a plot for 1st core config for mode and frame size comparison - core = '1S/1C/1T' - - ydata = [] - for mode in TestL3fwd.methods: - mode_ydata = [] - for frame_size in TestL3fwd.frame_sizes: - for row in data: - if row[2] == core and row[0] == frame_size and \ - row[1] == mode: - mode_ydata.append(float(row[4])) - - ydata.append(mode_ydata) - - str_frame_sizes = [] - for frame_size in TestL3fwd.frame_sizes: - str_frame_sizes.append(str(frame_size)) - - image_path = self.plotting.create_bars_plot( - 'test_perf_l3fwd_2ports_1S_1C_1T', - 'L3fwd 1S/1C/1T cores, 2 ports', - TestL3fwd.frame_sizes, - ydata, - ylabel='% linerate', - legend=TestL3fwd.methods) - - dts.results_plot_print(image_path) - def set_up_all(self): """ Run at the start of each test suite. @@ -513,7 +359,6 @@ class TestL3fwd(TestCase,IxiaPacketGenerator): if number_sockets >= int(test_case[1].split('/')[0][0]): self.get_throughput(frame_size, *test_case) - self.plot_4_ports() dts.results_table_print() def test_perf_l3fwd_2ports(self): @@ -615,7 +460,6 @@ class TestL3fwd(TestCase,IxiaPacketGenerator): dts.results_table_add_row(data_row) self.l3fwd_test_results['data'].append(data_row) - self.plot_2_ports() dts.results_table_print() def test_perf_rfc2544(self): -- 1.9.3