diff options
author | Martin Klozik <martinx.klozik@intel.com> | 2015-09-07 00:44:50 +0100 |
---|---|---|
committer | Maryam Tahhan <maryam.tahhan@intel.com> | 2015-09-29 10:29:55 +0000 |
commit | 8312bd4367395fdba877f084d1f72590f10c44c7 (patch) | |
tree | 2c1d67263656bd510c2d5571ca3a0e466067038b /testcases | |
parent | f8739e7feb9973550ef2fc69e6768b331e0ef28e (diff) |
Sysmetrics implementation update
New sysmetrics implementation is based on pidstat command line tool
from sysstat package. Old non-functional implementation was removed.
Reporting was refactored to generate report after each TC from values
already available in memory.
Following files were affected:
modified: conf/01_testcases.conf
modified: conf/02_vswitch.conf
modified: conf/05_collector.conf
deleted: core/collector_controller.py
modified: core/component_factory.py
modified: docs/NEWS.rst
modified: packages.txt
modified: requirements.txt
modified: testcases/testcase.py
modified: tools/collectors/collector/collector.py
modified: tools/collectors/sysmetrics/__init__.py
deleted: tools/collectors/sysmetrics/linuxmetrics.py
new file: tools/collectors/sysmetrics/pidstat.py
modified: tools/report/report.jinja
modified: tools/report/report.py
modified: tools/systeminfo.py
modified: vsperf
JIRA: VSPERF-67
Change-Id: I25a79f2afef405b9ac46ae85c18044af167a62a4
Signed-off-by: Martin Klozik (martinx.klozik@intel.com)
Reviewed-by: Billy O Mahony <billy.o.mahony@intel.com>
Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com>
Reviewed-by: Al Morton <acmorton@att.com>
Reviewed-by: Gurpreet Singh <gurpreet.singh@spirent.com>
Reviewed-by: Tv Rao <tv.rao@freescale.com>
Diffstat (limited to 'testcases')
-rw-r--r-- | testcases/testcase.py | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/testcases/testcase.py b/testcases/testcase.py index 3ea97c3a..6d37ce52 100644 --- a/testcases/testcase.py +++ b/testcases/testcase.py @@ -22,6 +22,7 @@ from collections import OrderedDict from core.results.results_constants import ResultsConstants import core.component_factory as component_factory from core.loader import Loader +from tools.report import report class TestCase(object): """TestCase base class @@ -41,7 +42,6 @@ class TestCase(object): self.desc = cfg.get('Description', 'No description given.') self._traffic_type = cfg['Traffic Type'] self.deployment = cfg['Deployment'] - self._collector = cfg['Collector'] self._bidir = cfg['biDirectional'] self._frame_mod = cfg.get('Frame Modification', None) @@ -77,17 +77,16 @@ class TestCase(object): self.deployment, loader.get_vswitch_class(), self._bidir) - collector_ctl = component_factory.create_collector( - self._collector, - loader.get_collector_class()) + collector = component_factory.create_collector( + loader.get_collector_class(), + self._results_dir, self.name) loadgen = component_factory.create_loadgen( self._loadgen, self._load_cfg) self._logger.debug("Setup:") - collector_ctl.log_cpu_stats() with vswitch_ctl, loadgen: - with vnf_ctl: + with vnf_ctl, collector: traffic = {'traffic_type': self._traffic_type, 'bidir': self._bidir, 'multistream': self._multistream} @@ -177,13 +176,15 @@ class TestCase(object): traffic_ctl.print_results() self._logger.debug("Collector Results:") - self._logger.debug(collector_ctl.get_results()) + collector.print_results() - output_file = "result_" + self.name + "_" + self.deployment +".csv" + output_file = os.path.join(self._results_dir, "result_" + self.name + + "_" + self.deployment + ".csv") - TestCase._write_result_to_file( - self._append_results(traffic_ctl.get_results()), - os.path.join(self._results_dir, output_file)) + tc_results = self._append_results(traffic_ctl.get_results()) + TestCase._write_result_to_file(tc_results, output_file) + + report.generate(output_file, tc_results, collector.get_results()) def _append_results(self, results): """ |