From: Ding Heng <hengx.ding@intel.com>
To: dts@dpdk.org
Cc: Ding Heng <hengx.ding@intel.com>
Subject: [dts] [PATCH 2/2] l3fwd: delete plot funtions
Date: Thu, 31 Dec 2015 16:25:54 +0800 [thread overview]
Message-ID: <1451550354-26047-2-git-send-email-hengx.ding@intel.com> (raw)
In-Reply-To: <1451550354-26047-1-git-send-email-hengx.ding@intel.com>
Signed-off-by: Ding Heng <hengx.ding@intel.com>
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
next prev parent reply other threads:[~2015-12-31 8:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-31 8:25 [dts] [PATCH 1/2] l3fwd: enable rfc2544 case and change result format for generate report Ding Heng
2015-12-31 8:25 ` Ding Heng [this message]
2015-12-31 8:36 ` [dts] [PATCH 2/2] l3fwd: delete plot funtions Xu, Qian Q
2016-01-06 1:04 ` [dts] [PATCH 1/2] l3fwd: enable rfc2544 case and change result format for generate report Liu, Yong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1451550354-26047-2-git-send-email-hengx.ding@intel.com \
--to=hengx.ding@intel.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).