aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/runners
AgeCommit message (Collapse)AuthorFilesLines
2016-01-13Fix flake8 errorsJo¶rgen Karlsson2-3/+4
Change-Id: I14f21092f5e97abf0629a92a27062846a6d3130b JIRA:- Signed-off-by: Jo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com> (cherry picked from commit 791323df72d8bf4f4f4c32a1e7273721f2adc349)
2016-01-08support for ipv6kubi1-48/+53
JIRA:YARDSTICK-187 Change-Id: I1cecd400b4449a09d22d43f4a42e889f00dd4fe7 Signed-off-by: kubi <jean.gaoliang@huawei.com> (cherry picked from commit cd80b44f3fd9b8c9e2afc51bc67d7a5cf34fb1c6)
2015-12-21To avoid breaking tests when monitor is setPer Holmgren2-2/+2
Two runners, Arithemic and Sequence, broke running tests even if SLA "monitor" was set. Changed these two runners to work in similar fashion as the other two, i.e. that only None can break. "assert" still asserts, and "monitor" just logs but then continues. Change-Id: Ic441761cad8747e5ecfcd0babe719c1aa23981e7 JIRA: -
2015-12-18Changes Arithmetic runner to accept several step parametersPer Holmgren1-28/+63
The Arithmetic runner is modified to accept several named parameters to iterate over in each scenario. Possible to chose either to iterate through them in a nested-for-loop fashion (default) or in a tupled loop fashion (combine i:th element of each input). Still possible to only provide one parameter to step/iterate over, as before. All existing yaml files with Arithmetic types have been modified to run the tests as before, and to provide same results as before this change. The only change is in sample file pktgen.yaml to provide a valid example of how to use this modification. It is also possible to step backwards, i.e. start > stop, with a negative step parameter value. (Noticed that tests are terminated when there is SLA error problems in "monitor" mode. Should be fixed in another commit) Change-Id: Ib2ebd24b71dd55d6817cee8e67026a0dd13a9e17 JIRA: -
2015-12-15Add run_in_background attribute to scenariosJo¶rgen Karlsson5-14/+40
This change adds the possibility to run scenarios as "background tasks". Background scenarios/tasks: - are started before all "normal scenarios" - runs in parallel with "normal scenarios" - terminates when all "normal scenarios" have completed their tasks They are intended as a way to perform background tasks, e.g. collect data such as cpuload etc, in parallel with the execution of normal benchmarking scenarios. Note that we already have the 'run_in_parallel' attribute but this attribute has a couple of issues and do not solve all the uses cases. Change-Id: I9c5230bfdbbb66030f57b658ce1db87ff2c2d62b Signed-off-by: Jo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>
2015-10-27Heat context code refactor part 2QiLiang5-27/+31
Heat context code refactor to cater for the evolution of the Yardstick framework. Refactor runner_cfg host/target info handle, as specified at https://etherpad.opnfv.org/p/yardstick_framework step 4. Get general Context info (use Context.get). Before this refactor host and target vm must have the same user name and ssh key, that is not general enough for later extension. test_case.yaml do NOT need to change. JIRA: YARDSTICK-168 Change-Id: I5cfe868f3c6f633214ef550bc9676fe1de0709db Signed-off-by: QiLiang <liangqi1@huawei.com>
2015-10-22Update sla check for scenarioshoujingwen4-4/+4
This patch modify the question that SLA check result is not complete. JIRA: YARDSTICK-172 Change-Id: I10438390baee92caf00dbfcdbdb833823ff8ce31 Signed-off-by: houjingwen <houjingwen@huawei.com>
2015-10-16Use result_collection_api to store test resultQiLiang1-0/+1
Execute a sample task file from Yardstick, push the test results to MongodB provided by Releng using the common result api provided by Functest. Usage: 0) install yardstick 1) config yardstick mkdir /etc/yardstick cat << EOF >> /etc/yardstick/yardstick.conf [DEFAULT] debug = True dispatcher = http [dispatcher_http] timeout = 5 target = http://213.77.62.197/results EOF 2) run test yardstick task start sample/fio.yaml 3) fetch result from remote result_collection_api curl "http://213.77.62.197/results?case=Fio&installer=compass" JIRA: YARDSTICK-132 Change-Id: I0996c6487c1900704380feb895555057a3f184e9 Signed-off-by: QiLiang <liangqi1@huawei.com>
2015-10-16add error handling when given failing script callswym_libra1-23/+70
JIRA:YARDSTICK-100 Change-Id: I1986b5e443abf186ef9c0235b66ada26c8574af1 Signed-off-by: wym_libra <yimin.wang@huawei.com>
2015-10-15Support general configuration fileQiLiang1-1/+5
Use openstack library oslo_config for parsing configuration options from the command line and configuration files. Refer http://docs.openstack.org/developer/oslo.config/ or rally source code for more info on oslo_config library usage. This patch is initially for test result dispatcher configuration, but it is very general to use. Usage: 0) install yardstick 1) mkdir /etc/yardstick 2) cp <repo_root_dir>/etc/yardstick/yardstick.conf.sample \ /etc/yardstick/yardstick.conf 3) edit /etc/yardstick/yardstick.conf 4) run `yardstick task start xxx` cmd JIRA: YARDSTICK-61 Change-Id: I01677ef6e9ab7c1975aa193799195e850da73478 Signed-off-by: QiLiang <liangqi1@huawei.com>
2015-09-22Structure output and make it less redundantJo¶rgen Karlsson5-74/+90
Note: this commit replaces: https://gerrit.opnfv.org/gerrit/#/c/976/8 Adjusts the JSON output of the runners to follow a different structure, laid out below. It is based upon the patch above but is not using the output manager. The purpose is to provide a unified basic layout (as already existed), while making long data series much less repetitive and more space efficient. OUTPUT FORMAT: ------------------------------------------------------------------------ RUNNER PREP - printed exactly once per runner per scenario. Runner MUST print this before sending any RUNNER DATA output { runner_id: <int> scenario_cfg: { <scenario and runner config> } } where runner_id: ID of the runner sending this block scenario_cfg: scenario and runner configuration ------------------------------------------------------------------------ RUNNER DATA runner may print any number of these AFTER having printed a RUNNER PREP { runner_id: <int> benchmark: { <measurements> } } ------------------------------------------------------------------------ The runner_id currently is not unique across runners as it is assigned by noting the runner process id in the underlying operating system. A possible improvement would be to assign runner_id an UUID value according to RFC 4122 (e.g. uuid.uuid4() in python). ------------------------------------------------------------------------ Other changes/cleanups in this patch: - Removed the context argument from _worker_process as it was redundant. It contained a dictionary with the runner configuration but the same dictionary was already in included in the scenario_args argument. - For clarity renamed scenario_args to scenario_cfg. scenario_cfg was the original name used in task.py and it changed name across function calls. Change-Id: I17d96f37c7d3e24b0747d23fcad7509fa949d662 JIRA: YARDSTICK-59 Signed-off-by: Jo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>
2015-08-24Add test result dispatcherQiLiang1-11/+13
This patch is the initial implementation of DB result storage. Having implemented a dispathcer which enable user select different ways to store test results according to different requirements. This patch can support not only local file storage, but also remote storage by using http request(it will call common-db-api when available). Later, local DB sotrage will be supported. This patch is raw and simple, which is implemented with reference to openstack ceilometer. Any comment is welcome. JIRA: YARDSTICK-61 Change-Id: Icaf8369edfab5d05f0819eb02d5b05dc8a04d69d Signed-off-by: QiLiang <liangqi1@huawei.com>
2015-08-16Add iteration type for Runnerkubi1-0/+111
A Iteration runner is roughly the same as a Duration runner but runs for a configurable number of times/iterations instead of time. Basically just the termination condition is different. modify the unit and default value of iteration. rename iteration to iterations JIRA:YARDSTICK-49 Change-Id: I67f4014dc3cf923cd31cc2e990e2f7219bce40fe Signed-off-by: kubi <jean.gaoliang@huawei.com>
2015-08-06Fix typo in runner outputraindirve2-2/+2
Sequence and Arithmetic runners have an extra colon in their 'sargs:' output. This commit removes that unnecessary and incorrect character. Change-Id: I9bb1af5397812318e94e3bd71c680605c4917c1a JIRA: YARDSTICK-98 Signed-off-by: raindirve <seanw@kth.se>
2015-07-28Fix a bug for algorithm of arithmetic runner.kubi1-1/+2
since value will overstep the stop value under some condition JIRA:YARDSTICK-97 Change-Id: I11656206fc9b576283d243a3be249276dba03759 Signed-off-by: kubi <jean.gaoliang@huawei.com>
2015-07-15Fix yardstick.out overwritten bugpanghao11-1/+1
The output of scenarios will be appended to the yardstick.out file. JIRA: YARDSTICK-45 Change-Id: I185c6d2a8a534c8bb2b731bb84c47bdf4bad4427 Signed-off-by: panghao1 <shamrock.pang@huawei.com>
2015-07-08Add support for action hooks in runner configHans Feldt1-1/+74
pre-start and post-stop intention is to be used to gather information about the target system. single-shot and periodic-action intention is to perform actions on the infrastructure or cloud resources. For example server live migration or network interface down. Example of what can be added in the runner section: pre-start-action: command: "heat stack-show demo" periodic-action: interval: 10 command: "ifconfig vboxnet1" single-shot-action: after: 30 command: "nova show goofy.demo" post-stop-action: command: "nova list" pre-start and post-stop data are added into the output file. periodic and single-shot are not because that would interfere with the actual sampled data. Besides the intention is not to log statistics but do things with the infrastructure such as server live migration. TODO: add sections to the output file, something like pre, data & post JIRA: YARDSTICK-46 Change-Id: Ia059813fb74733f86368aea9c7a20e5afb71d228 Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
2015-07-03Add new sequence runnerKristian Hunt1-0/+124
The "sequence" runner will use an input value of the test for every run from a pre-defined list from the task file. Example runner section of the task file: type: Sequence interval: 1 scenario_option_name: packetsize sequence: - 100 - 150 - 200 JIRA: YARDSTICK-47 Change-Id: I5bde9b78cb356499c338ef3da26ac1783670887d Signed-off-by: Kristian Hunt <kristian.hunt@gmail.com>
2015-06-29Add support to list and show runners & scenariosHans Feldt3-3/+49
Example usage and output: $ yardstick runner list +------------------------------------------------------------------------------+ | Type | Description +------------------------------------------------------------------------------+ | Duration | Run a scenario for a certain amount of time | Arithmetic | Run a scenario arithmetically stepping an input value | Constant | Run a scenario a certain number of times +------------------------------------------------------------------------------+ $ yardstick runner show Duration Run a scenario for a certain amount of time If the scenario ends before the time has elapsed, it will be started again. Parameters duration - amount of time the scenario will be run for type: int unit: seconds default: 1 sec interval - time to wait between each scenario invocation type: int unit: seconds default: 1 sec $ yardstick scenario list +------------------------------------------------------------------------------+ | Type | Description +------------------------------------------------------------------------------+ | Iperf3 | Execute iperf3 between two hosts | Pktgen | Execute pktgen between two hosts | Ping | Execute ping between two hosts +------------------------------------------------------------------------------+ $ yardstick scenario show Iperf3 Execute iperf3 between two hosts By default TCP is used but UDP can also be configured. For more info see http://software.es.net/iperf Parameters bytes - number of bytes to transmit only valid with a non duration runner, mutually exclusive with blockcount type: int unit: bytes default: 56 udp - use UDP rather than TCP type: bool unit: na default: false nodelay - set TCP no delay, disabling Nagle's Algorithm type: bool unit: na default: false blockcount - number of blocks (packets) to transmit, only valid with a non duration runner, mutually exclusive with bytes type: int unit: bytes default: - JIRA: - Change-Id: If218e129a30af7e20792190003c214677e732252 Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
2015-06-09add pktgen scenario and sampleJörgen Karlsson1-1/+1
Supports measuring network throughput UDP. SLA can be verified for packet lost per million packets (ppm) Change-Id: Ie5972f189bbe58b39a2fae98630b2f117c176ae5 JIRA: YARDSTICK-5 Signed-off-by: Jorgen Karlsson <jorgen.w.karlsson@ericsson.com>
2015-06-04fix exit status at SLA assertionHans Feldt1-0/+10
tested by changing SLA action to assert and lower rtt, yardstick command should exit non zero Change-Id: I2dd091941fb4359add849f218cacc04f364142cd JIRA: YARDSTICK-25 Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
2015-05-26add setup/teardown to scenario base class and runnersHans Feldt2-7/+13
Prepare for "service type" of scenarios that e.g. needs to start a service in setup and shut it down in teardown. In the runners, instantiation of the scenario is moved after the "worker START" log to get a more logical sequence logged. Change-Id: Idfaf5bb396eab9261e820291885b5a1dbc32f71e JIRA: - Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
2015-05-21add package runners and a few runnersHans Feldt4-0/+294
The "duration" runner will run a test for an amount of time. The "arithmetic" runner will increase an input value of the test for every run until a limit is reached. Change-Id: I31c9864604110ce3f5d19ec110144d1c886c7620 JIRA: - Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>