From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 518DE8D8B for ; Thu, 4 Feb 2016 02:56:07 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP; 03 Feb 2016 17:56:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,393,1449561600"; d="scan'208";a="876529272" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga001.jf.intel.com with ESMTP; 03 Feb 2016 17:56:05 -0800 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id u141u323017150; Thu, 4 Feb 2016 09:56:03 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u141u1Wv002177; Thu, 4 Feb 2016 09:56:03 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id u141u1MM002173; Thu, 4 Feb 2016 09:56:01 +0800 From: Yong Liu To: dts@dpdk.org Date: Thu, 4 Feb 2016 09:55:59 +0800 Message-Id: <1454550959-2138-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH] tests: remove plotting module function 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, 04 Feb 2016 01:56:08 -0000 Remove plot image function from test cases, there's no need to generate performance image by now. Signed-off-by: Marvin Liu diff --git a/tests/TestSuite_fdir.py b/tests/TestSuite_fdir.py index fa4a3ef..122e665 100644 --- a/tests/TestSuite_fdir.py +++ b/tests/TestSuite_fdir.py @@ -44,7 +44,6 @@ from scapy.utils import struct, socket, PcapWriter import dts from etgen import IxiaPacketGenerator from test_case import TestCase -from plotting import Plotting from settings import HEADER_SIZE from pmd_output import PmdOutput @@ -64,29 +63,6 @@ class TestFdir(TestCase, IxiaPacketGenerator): # Utility methods and other non-test code. # ########################################################################### - def plot_results(self, number_ports): - - cores_configs = [] - percent_values = [] - - # Append the percentage results for the all the cores configs - for test_cycle in self.test_cycles: - cores_configs.append(test_cycle['cores']) - config_results = [] - for frame_size in self.frame_sizes: - config_results.append(test_cycle['pct'][frame_size]) - - percent_values.append(config_results) - - image_path = self.plotting.create_bars_plot( - 'test_perf_pmd_%sports' % number_ports, - 'PMD, %d ports' % number_ports, - self.frame_sizes, - percent_values, - ylabel='% linerate', - legend=cores_configs) - - dts.results_plot_print(image_path) def send_and_verify(self, condition, packet): """ @@ -218,8 +194,6 @@ class TestFdir(TestCase, IxiaPacketGenerator): self.table_header.append("%s Mpps" % test_cycle['cores']) self.table_header.append("% linerate") - self.plotting = Plotting(self.dut.crb['name'], self.target, self.nic) - def set_up(self): """ Run before each test case. @@ -952,7 +926,6 @@ class TestFdir(TestCase, IxiaPacketGenerator): dts.results_table_add_row(table_row) - self.plot_results(number_ports=2) dts.results_table_print() def ip(self, port, frag, src, proto, tos, dst, chksum, len, version, flags, ihl, ttl, id, options=None): diff --git a/tests/TestSuite_l2fwd.py b/tests/TestSuite_l2fwd.py index e36bafb..10a86ca 100644 --- a/tests/TestSuite_l2fwd.py +++ b/tests/TestSuite_l2fwd.py @@ -36,34 +36,11 @@ Test Layer-2 Forwarding support import dts from test_case import TestCase -from plotting import Plotting from settings import HEADER_SIZE class TestL2fwd(TestCase): - def plot_results(self): - - queues = [] - queues_results = [] - - for test_queues in self.test_queues: - queues.append(str(test_queues['queues'])) - results = [] - for frame_size in self.frame_sizes: - results.append(test_queues['pct'][frame_size]) - queues_results.append(results) - - image_path = self.plotting.create_bars_plot( - 'test_perf_l2fwd', - 'L2fwd, %d ports' % self.number_of_ports, - self.frame_sizes, - queues_results, - ylabel='% linerate', - legend=queues) - - dts.results_plot_print(image_path) - def set_up_all(self): """ Run at the start of each test suite. @@ -101,7 +78,6 @@ class TestL2fwd(TestCase): self.table_header.append("% linerate") dts.results_table_add_header(self.table_header) - self.plotting = Plotting(self.dut.crb['name'], self.target, self.nic) def set_up(self): """ @@ -228,7 +204,7 @@ class TestL2fwd(TestCase): self.verify(self.test_queues[n]['Mpps'][frame_size] > 0, "No traffic detected") - # Prepare the results for table and plot printing + # Prepare the results for table for frame_size in self.frame_sizes: results_row = [] results_row.append(frame_size) @@ -238,7 +214,6 @@ class TestL2fwd(TestCase): dts.results_table_add_row(results_row) - self.plot_results() dts.results_table_print() def tear_down(self): diff --git a/tests/TestSuite_l3fwd.py b/tests/TestSuite_l3fwd.py index 63d6acd..31bb48c 100644 --- a/tests/TestSuite_l3fwd.py +++ b/tests/TestSuite_l3fwd.py @@ -37,7 +37,6 @@ Layer-3 forwarding test script. import dts import string import re -from plotting import Plotting from test_case import TestCase from exception import VerifyFailure from settings import HEADER_SIZE @@ -197,8 +196,6 @@ class TestL3fwd(TestCase,IxiaPacketGenerator): self.l3fwd_test_results = {'header': [], 'data': []} - self.plotting = Plotting(self.dut.crb['name'], self.target, self.nic) - def flows(self): """ Return a list of packets that implements the flows described in the diff --git a/tests/TestSuite_pmd.py b/tests/TestSuite_pmd.py index eeec53f..aeab99a 100644 --- a/tests/TestSuite_pmd.py +++ b/tests/TestSuite_pmd.py @@ -38,7 +38,6 @@ import dts import re import time from test_case import TestCase -from plotting import Plotting from time import sleep from settings import HEADER_SIZE from pmd_output import PmdOutput @@ -46,30 +45,6 @@ from etgen import IxiaPacketGenerator class TestPmd(TestCase,IxiaPacketGenerator): - def plot_results(self, number_ports): - - cores_configs = [] - percent_values = [] - - # Append the percentage results for the all the cores configs - for test_cycle in self.test_cycles: - cores_configs.append(test_cycle['cores']) - config_results = [] - for frame_size in self.frame_sizes: - config_results.append(test_cycle['pct'][frame_size]) - - percent_values.append(config_results) - - image_path = self.plotting.create_bars_plot( - 'test_perf_pmd_%sports' % number_ports, - 'PMD, %d ports' % number_ports, - self.frame_sizes, - percent_values, - ylabel='% linerate', - legend=cores_configs) - - dts.results_plot_print(image_path) - def set_up_all(self): """ Run at the start of each test suite. @@ -104,8 +79,6 @@ class TestPmd(TestCase,IxiaPacketGenerator): self.ports_socket = self.dut.get_numa_id(self.dut_ports[0]) - self.plotting = Plotting(self.dut.crb['name'], self.target, self.nic) - self.pmdout = PmdOutput(self.dut) def set_up(self): @@ -203,7 +176,6 @@ class TestPmd(TestCase,IxiaPacketGenerator): dts.results_table_add_row(table_row) - self.plot_results(number_ports=4) dts.results_table_print() def test_perf_pmd_performance_2ports(self): @@ -282,7 +254,6 @@ class TestPmd(TestCase,IxiaPacketGenerator): dts.results_table_add_row(table_row) - self.plot_results(number_ports=2) dts.results_table_print() def test_checksum_checking(self): diff --git a/tests/TestSuite_tso.py b/tests/TestSuite_tso.py index 142e0d1..6e45fdc 100644 --- a/tests/TestSuite_tso.py +++ b/tests/TestSuite_tso.py @@ -41,40 +41,11 @@ import dts import time import re from test_case import TestCase -from plotting import Plotting from settings import HEADER_SIZE class TestTSO(TestCase): dut_ports = [] - # - # - # Utility methods and other non-test code. - # - - def plot_results(self, number_ports): - - cores_configs = [] - percent_values = [] - - # Append the percentage results for the all the cores configs - for test_cycle in self.test_cycles: - cores_configs.append(test_cycle['cores']) - config_results = [] - for frame_size in self.frame_sizes: - config_results.append(test_cycle['pct'][frame_size]) - - percent_values.append(config_results) - - image_path = self.plotting.create_bars_plot( - 'test_perf_pmd_%sports' % number_ports, - 'PMD, %d ports' % number_ports, - self.frame_sizes, - percent_values, - ylabel='% linerate', - legend=cores_configs) - - dts.results_plot_print(image_path) def set_up_all(self): """ @@ -121,8 +92,6 @@ class TestTSO(TestCase): self.headers_size = HEADER_SIZE['eth'] + HEADER_SIZE[ 'ip'] + HEADER_SIZE['tcp'] - self.plotting = Plotting(self.dut.crb['name'], self.target, self.nic) - def set_up(self): """ Run before each test case. @@ -380,5 +349,4 @@ class TestTSO(TestCase): dts.results_table_add_row(table_row) - self.plot_results(number_ports=2) dts.results_table_print() -- 1.9.3