test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] tests: remove plotting module function
@ 2016-02-04  1:55 Yong Liu
  0 siblings, 0 replies; only message in thread
From: Yong Liu @ 2016-02-04  1:55 UTC (permalink / raw)
  To: dts

Remove plot image function from test cases, there's no need to generate
performance image by now.

Signed-off-by: Marvin Liu <yong.liu@intel.com>

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-02-04  1:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-04  1:55 [dts] [PATCH] tests: remove plotting module function Yong Liu

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).