aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/core
AgeCommit message (Collapse)AuthorFilesLines
2019-04-26Merge changes from topic 'feat/baro_nfvi_metrics'Volodymyr Mytnyk1-37/+156
* changes: Use baro and yardstick metrics in dynamic HTML report benchmark.core.report: Add _combine_times benchmark.core.report: Add _get_baro_metrics Add ability to get data from different DBs in influx Refactor: add _format_datasets
2019-04-04Update to support using external heat templatetreyad1-1/+19
Modify the _get_server() function when using external heat template. The server attrs should be read from stack.outputs. JIRA: YARDSTICK-1453 Change-Id: I00eda7476e77fc0a5c15ef8db7d057fa1cf267e6 Signed-off-by: treyad <treyad@viosoft.com>
2019-04-03Use baro and yardstick metrics in dynamic HTML reportEmma Foley1-6/+24
_combine_metrics combines metrics from different sources. This is for use with the ``yardstick report generate-nsb`` command, which will combine yardstick and barometer metrics in the dynamic HTML report. JIRA: YARDSTICK-1593 Change-Id: I87002948ebb4cc88fb0932380bcb9920eb53db58 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2019-02-21Unify TG and VNF names in infrastructure filesOrest Voznyy1-1/+1
Update naming in related files, i.e. pod, docs, docstrings. Rename TGs and VNFs to follow a single naming convention, for all VNFs: name: trafficgen_0 role: tg__0 name: vnf_0 role: vnf__0 JIRA: YARDSTICK-1578 Change-Id: I7596b915939f242349a99721b6088ae738dd277f Signed-off-by: Orest Voznyy <orestx.voznyy@intel.com>
2019-02-11benchmark.core.report: Add _combine_timesEmma Foley1-0/+31
_combine_times() combines and interleves separate lists of timestamps. This will allow the Yardstick and Barometer timestamps to be combined for the dynamic HTML report created with ``yardstick report generate-nsb`` command. JIRA: YARDSTICK-1593 Change-Id: I0f5ea4d001775495fb9b9b4de2d2360c9c61cc51 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2019-02-11benchmark.core.report: Add _get_baro_metricsEmma Foley1-0/+60
Retrieve and parse Barometer metrics relevant to a Yardstick testcase. _get_barometer_metrics() retrieves NFVi metrics from collectd for metrics collected during a Yardstick test case. JIRA: YARDSTICK-1593 Change-Id: I1ef1ccd999e1cbee546db39fb8ad6de0d97e6576 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2019-02-11Refactor: add _format_datasetsEmma Foley1-31/+41
JIRA: YARDSTICK-1593 Change-Id: I8d2c8665d767c92da20db8f97690f20da4a68908 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2019-01-30Refactor: add _get_timestamps()Emma Foley1-10/+21
JIRA: YARDSTICK-1593 Change-Id: I3ec352dd577c6030fa86a2817e264ba7c80773f1 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2019-01-24Merge changes from topic 'report/html_table'Volodymyr Mytnyk1-42/+80
* changes: Additional rework of NSB report Only show metrics for selected nodes in data table Fix conversion to JS for HTML reports
2018-12-24Merge "Compatible with python2 and 3 string check"Jing Lu1-1/+2
2018-12-21Additional rework of NSB reportPatrice Buriez1-12/+17
- Make format_for_jstree expect a list of metric names - Avoid displaying timestamps twice in initial data table - Sort metrics in initial data table - Display testcase name - Fix styling - Make better use of JS and jQuery features - Move event handler to JS file - Avoid adding multiple tbody elements into data table - Adjust unit tests and functional tests accordingly JIRA: YARDSTICK-1367 Topic: report/html_table (12 of 12) Change-Id: I85d853f8e392953cace67e94fa0af2e2492a2b86 Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
2018-12-21Fix conversion to JS for HTML reportsPatrice Buriez1-30/+63
Some new fields in InfluxDB have plain text contents that AST cannot parse as valid expressions, resulting in exceptions being raised by yardstick CLI commands "report generate" and "report generate-nsb". Reworked _generate_common() to properly handle and convert: - unicode, str and missing keys - None, unicode, str, float, long and int values - float, long and int stored as unicode or str values Added test__generate_common() unit test, to verify all possible conversion flavors. Also renamed incorrect "tasks" to "metrics". Also fixed warning in Python3 for some unit tests, caused by deprecation of unittest.TestCase.assertRaisesRegexp(). JIRA: YARDSTICK-1367 Topic: report/html_table (10 of 12) Change-Id: Iff75bfd2c1dcaf3806f67f52f0ea594f10aceb5b Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
2018-12-19Add report generate-nsb commandPatrice Buriez1-13/+50
JIRA: YARDSTICK-1367 Topic: report/html_table (8 of 12) Change-Id: I8a2f96224a745334b67dd71875bebb3b69b9adc3 Signed-off-by: Emma Foley <emma.l.foley@intel.com> Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
2018-12-19Use Chart.js for graphs in HTML reportsPatrice Buriez1-7/+4
This JavaScript library is available under MIT license. Also adjusted version for jQuery and jsTree, and added fallback font-family names. JIRA: YARDSTICK-1367 Topic: report/html_table (6 of 12) Change-Id: Ibe8b7e3d1f1365d2cbc019bfc22762aaa365a4e1 Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
2018-12-07Compatible with python2 and 3 string checkcope.li1-1/+2
JIRA:YARDSTICK-1557 Change-Id: I54ee4d6ef835e8e6ecd55cfa305151e842f88b03 Signed-off-by: cope.li <cope.li@huawei.com>
2018-11-22Add parser to support jsTree in reportPatrice Buriez1-3/+63
Allow the user to select what data to show in the report using jsTree to navigate a hierarchical metrics list. JIRA: YARDSTICK-1367 Topic: report/html_table (4 of 11) Change-Id: I86d782a0a70b80a1cdfaab2f41afb7668066cbf7 Signed-off-by: Emma Foley <emma.l.foley@intel.com> Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
2018-11-22Generate report from a file instead of stringPatrice Buriez1-14/+17
``$ yardstick report generate ...`` now renders a template stored in a file instead of from an imported string Instead of using Django, templating is done by jinja2, as this is used in other parts of Yardstick. JIRA: YARDSTICK-1367 Topic: report/html_table (2 of 11) Change-Id: Iaff53e7e28903e46164ce0977f6b8adbe04d23d7 Signed-off-by: Emma Foley <emma.l.foley@intel.com> Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
2018-11-21Update unit tests for yardstick/benchmark/core/report.pyPatrice Buriez1-6/+2
* Remove redundant imports * Rename some constants * Add additional unit tests * Reword KeyError message JIRA: YARDSTICK-1367 Topic: report/html_table (1 of 11) Change-Id: I3d89c1ed9acaeb7421a0734e33075ebae252c035 Signed-off-by: Emma Foley <emma.l.foley@intel.com> Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
2018-07-05Make context types constantsRodolfo Alonso Hernandez1-16/+20
Make context types constants. These are the current context types: - Dummy - Heat - Kubernetes - Node - StandaloneOvsDpdk - StandaloneSriov Any reference to a context type should use the referred constant. JIRA: YARDSTICK-1292 Change-Id: I1ff0085161f88304d71e3ddad7975f9020e0fc20 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-05-21Add "host_name_separator" variable to Context classRodolfo Alonso Hernandez1-19/+14
This feature will provide Kubernetes context the ability to handle the context name inside the class itself, providing to the developer an abstraction of the possible naming limitations in Kubernetes. E.g.: "dot" character in Pod names is no allowed [1]. [1] https://github.com/fabric8io/fluent-plugin-kubernetes_metadata_filter/issues/58 JIRA: YARDSTICK-1188 Change-Id: I82121f970b550170357a443b6340be7900602a57 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-04-16Get HA test case results on failureMiikka Koistinen1-11/+18
Now, yardstick HA test cases (which have 'sla action: monitor') do not output results if the test case SLA validation fails. This patch modifies the task runner and the serviceHA scenario so that during an SLA validation failure the test result data is captured correctly. Do similar changes in the general scenario. JIRA: YARDSTICK-1115 Change-Id: I648a8b229600c0ad089320ac3f803698f73aa800 Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2018-03-22Merge "Running Test Case in Latest Yardstick Docker Image shows Error"Jack Chan1-3/+13
2018-03-20Running Test Case in Latest Yardstick Docker Image shows Errorchenjiankun1-3/+13
JIRA: YARDSTICK-1080 This bug will only occur in kubernetes test case. In openstack, we use 'stack_name.context', but some kubernetes resources(pod, etc) do not support this format. So we use 'name-context'. Change-Id: I87d61c027d55449914bc283672eb98be3d3fe22f Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2018-03-14Fix retrieving "options" section in "scenario"Rodolfo Alonso Hernandez1-2/+4
In [1] a new method to rename the "scenario" host names was implemented. This method parses all sections with host names and applies the "qualified" name. Some malformed test cases define the "options" section without content. This causes that [2] retrieves "None" value instead of an empty dictionary. This possibility must be handled in the new method. [1]I44da30dac562c1a4166e084645ae91c17798651d [2]https://github.com/opnfv/yardstick/blob/4b8b674b65830a24230faed71e8d9a1048139c89/yardstick/benchmark/core/task.py#L630 JIRA: YARDSTICK-1073 Change-Id: I8864b428734ead8c5aa39de5091d3a2a691be060 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-03-08[bugfix] report generate command print errorrexlee87761-1/+1
JIRA: YARDSTICK-1056 Change-Id: I32ab9ae7482f6b81e00d6d3e7e858d980a2dd95f Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2018-03-05Merge "Fix report generation"Ross Brattain1-3/+5
2018-03-05Fix report generationXavier Simonart1-3/+5
The command "yardstick report generate task_id yaml_name" was returning some errors and failing to generate a html report. With this fix an html report will be generated with all data from influx. JIRA: YARDSTICK-1023 Change-Id: If9aab4b85cfb2b5809f608568e1adb2ddeec8b78 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2018-03-02Merge "Add "render-only" option to "task" command"Rodolfo Alonso Hernandez2-47/+83
2018-03-01Merge "Add ability to reuse existing OpenStack set-up"Ross Brattain1-1/+3
2018-03-01Add "render-only" option to "task" commandRodolfo Alonso Hernandez2-47/+83
This new option provides to the user the ability to output the rendered input files. This option could be useful in case the input files are Jinja2 templates, depending on input arguments. The user can preview the rendered input tasks files without executing them. JIRA: YARDSTICK-1020 Change-Id: Ib15ade7e1adcb29beae5e635fb5d02045c4432bb Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-03-01Add ability to reuse existing OpenStack set-upEmma Foley1-1/+3
This change adds two optional flags to the context configuration for heat: * no_setup -- to re-use an existing OpenStack deployment * no_teardown -- to skip undeploying the context, so it is available in other testcases In order to achieve this, resource naming had to be made more predictable. When no_setup or no_teardown are set: * Do not add a suffix to context name * When searching, try with and without a suffix to find a server by name All behaviors remain the same unless these values are set. NOTE: This feature doesn't work with the NSPerf scenario, because the interfaces in the VNFs are bound to DPDK after the first test, so the look-up for missing topology information fails in subsequent test runs, as the interfaces are not visable to the kernel. This can be addressed either by either unbinding the interfaces from DPDK at the end of each test, or modifying the look-up for the missing topology information to query DPDK as well. The change will be made in a future patch. JIRA: YARDSTICK-886 Change-Id: I6df5e86e419c283a2bee41917e4f62179aa9c31a Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-03-01Merge changes from topics 'feat/keep_vnf', 'YARDSTICK-886'Ross Brattain1-43/+64
* changes: Add _create_new_stack method Update TaskParser to deal with qualified name in Context Add qualified name to Context
2018-03-01Update TaskParser to deal with qualified name in ContextEmma Foley1-43/+64
The context name depends on the defined name in the testcase input file, the task ID and the flags of the context. If the context is going to be undeployed at the end of the test, the task ID is suffixed to the name to avoid interferences with previous deployments. If the context needs to be deployed at the end of the test, the name assigned is kept. This patch makes this process transparent to the developer. This patch modifies how TaskParser determines the correct context name, taking into account that the name might change based on context flags. JIRA: YARDSTICK-886 Change-Id: I44da30dac562c1a4166e084645ae91c17798651d Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-02-23Yardstick real-time influxdb KPI reporting regressionschenjiankun1-9/+10
JIRA: YARDSTICK-989 We used to have real-time influxdb reporting of test KPIs. The user could monitor using grafana and see the real-time output. The record format was changed to now only report KPIs at the end of the test. This is a problem for test cases which run for a long duration, we need to wait until the end of the test execution to get any results from influxdb. If the test fails in between or doesn't exit cleanly for some reason, we are left with no results stored in influxdb which gives the user no information. This is also a regression from the previous behaviour. Change-Id: I0f476dff9162a359f0286fb421f2e9c4befaa5cc Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2018-02-20Make files pep8 compliantEmma Foley1-3/+3
This change makes files pep8 compliant before adding the reuse context feature JIRA: YARDSTICK-886 Change-Id: Iae7daaa159a9ddbb5809a9a7ac74f8a53683089a Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2017-12-15pretty cli format: runner/scenario/testcase listrexlee87763-24/+22
JIRA: YARDSTICK-855 1. using prettytable to reformat cli below: yardstick runner list yardstick scenario list yardstick testcase list 2. remove redundant function print_hbar 3. fix pep8 problems, the framework using do_list dynamicly, so disable unused-argument check for now. Change-Id: I79e1226e21fca4624bf4436414917bd07ecabca0 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2017-11-07Create get_description and get_scenario_type for ScenarioRodolfo Alonso Hernandez1-4/+3
Created two new class functions for Scenario class: * "get_description" will return the first line of the docstring, if exists. * "get_scenario_type" will return the value of "__scenario_type__" variable. Change-Id: I8e3b47e33e0bae101b874c3975bb9c383397d188 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2017-10-13task: use CONF_FILE from constantsRoss Brattain1-2/+2
I'm not sure why we hardcoded config_file when the CONF_FILE constant will work. Change-Id: I45a1dc17ac2b185c659725f55462214acb74838d Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-10-11task: drain background runner queuesRoss Brattain1-6/+14
We were not draining the queues in the background runners. Modify the main runner_join loop to loop over all the runners and drain them. The runner join method does extra work for periodic actions so we can't change its behavior. Instead create a new poll() method and use that to check runner status Change-Id: I9466ba40a6a4c45c82cedff279cbb4817c6b66ad Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-10-02drain runner queue and undo cancel_join_threadRoss Brattain1-15/+16
Sometimes the runners can hang. Initially debugging lead to the queue join thread, so I thought we could cancel all the join threads and everything would be okay. But it turns out canceling the queue join threads can lead to corruption of the queues, so when we go to drain the queues the task hangs. But it also turns out that we were not properly draining the queues in the task process. We were waiting for all the runners to exit, then draining the queues. This is bad and will cause the queues to fill up and hang and/or drop data or corrupt the queues. The proper fix seems to be to draining the queues in a loop before calling join with a timeout. Also modified the queue drain loops to no block on queue.get() Revert "cancel all queue join threads" This reverts commit 75c0e3a54b8f6e8fd77c7d9d95decab830159929. Revert "duration runner: add teardown and cancel all queue join threads" This reverts commit 7eb6abb6931b24e085b139cc3500f4497cdde57d. Change-Id: Ic4f8e814cf23615621c1250535967716b425ac18 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-09-25task: fixup s/exe_info/exc_infoRoss Brattain1-1/+1
JIRA: YARDSTICK-785 Change-Id: Ib37498e8df6a520f1d03256b73346fcedab3a177 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-09-25Merge "Log each test case status in a task"Ross Brattain1-2/+5
2017-09-21Add service in kubernetes contextchenjiankun1-5/+5
JIRA: YARDSTICK-803 Currently kubernetes test case can only run in master node. We need to support it run in jump server. So I add service and use nodePort type. Then we can login the pod using nodePort. Change-Id: Ia7900d263f1c5323f132435addec27ad10547ef9 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-09-21Merge "Add host&targer in scenario['options']['server_name'] support"Jing Lu1-31/+37
2017-09-15Generate pod.yaml from current contextRoss Brattain1-0/+1
We want to generate pod.yaml from Heat contexts so we can re-use the context without destroying it. But we don't have node role information and it doesn't make sense in this case, so make the role optional. Since we changed Heat to use pkey instead of key_filename, we can embed the pkey into the pod.yaml, but we have to make sure to convert the pkey to string, in case it is a RSAKey object Change-Id: Ibefcfbd8236e68013a704c39964cb870da825da8 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-09-15Merge "improve logging, clear using print"Rex Lee2-22/+20
2017-09-15Add host&targer in scenario['options']['server_name'] supportchenjiankun1-31/+37
JIRA: YARDSTICK-810 Currently host, target is in scenario, but as a input, we prefer it in scenario['options']. So I add support for under scenario['options']['server_name'] If we write host in scenario['options']['server_name'], the host ip info will be written in context. Change-Id: I90df20467ef5da772d22e9f272a2cac250f822e0 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-09-13Heat: support non-mesh network toplogyRoss Brattain1-6/+4
Previsouly we added all servers to every network in Heat in a full mesh. To more closely replicate test topology and to limit then number of ports we need to all each server to specify which ports should be connected to each network. This should also allow for some kind of multiport setup. Add optional network_ports dict to each server with network to port_list mapping match inteface based on port name or vld_id replace vld_id matching with network name matching, since network_name == vld_id Change-Id: I5de46b8f673949e3c17d8df6fa96f055c43886ce Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-09-14improve logging, clear using printrexlee87762-22/+20
Change-Id: I744353f631cf1771d75f750543e8612f81be71ee Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2017-09-11Log each test case status in a taskchenjiankun1-2/+5
JIRA: YARDSTICK-785 Currently if one test case failed, we will log error. But if one case success, we do not have any tips. We need log success when one case success. Change-Id: I0f41ac55f2569f44b787133e3f2594a5c5547f4a Signed-off-by: chenjiankun <chenjiankun1@huawei.com>