diff options
5 files changed, 36 insertions, 17 deletions
diff --git a/docs/testing/developer/devguide/index.rst b/docs/testing/developer/devguide/index.rst index fc3ca155d..92a18f6ee 100644 --- a/docs/testing/developer/devguide/index.rst +++ b/docs/testing/developer/devguide/index.rst @@ -5,9 +5,9 @@ .. http://creativecommons.org/licenses/by/4.0 .. (c) OPNFV, Ericsson AB and others. -********************************* -OPNFV Yardstick developer guide -********************************* +************************* +Yardstick Developer Guide +************************* .. toctree:: :maxdepth: 4 diff --git a/docs/testing/user/userguide/index.rst b/docs/testing/user/userguide/index.rst index 3b55b7f9b..707e12b56 100644 --- a/docs/testing/user/userguide/index.rst +++ b/docs/testing/user/userguide/index.rst @@ -5,9 +5,9 @@ .. http://creativecommons.org/licenses/by/4.0 .. (c) OPNFV, Ericsson AB and others. -=========================================== -Performance Testing User Guide (Yardstick) -=========================================== +******************** +Yardstick User Guide +******************** .. toctree:: :maxdepth: 4 diff --git a/samples/vnf_samples/nsut/vfw/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex_correlated_scale_2.yaml b/samples/vnf_samples/nsut/vfw/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex_correlated_scale_2.yaml index b12a62a1b..bfda0bb7f 100644 --- a/samples/vnf_samples/nsut/vfw/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex_correlated_scale_2.yaml +++ b/samples/vnf_samples/nsut/vfw/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex_correlated_scale_2.yaml @@ -15,14 +15,14 @@ --- schema: yardstick:task:0.1 scenarios: -- type: NSPerf - traffic_profile: ../../traffic_profiles/ipv4_throughput-2.yaml - topology: vfw-tg-topology-3node-2.yaml - nodes: - tg__0: tg_0.yardstick - tg__1: tg_1.yardstick - vnf__0: vnf_0.yardstick - vnf__1: vnf_1.yardstick + - type: NSPerf + traffic_profile: ../../traffic_profiles/ipv4_throughput-2.yaml + topology: vfw-tg-topology-3node-2.yaml + nodes: + tg__0: tg_0.yardstick + tg__1: tg_1.yardstick + vnf__0: vnf_0.yardstick + vnf__1: vnf_1.yardstick options: framesize: uplink: {64B: 100} diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc006.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc006.yaml index 81b42dc4d..fe244e81c 100644 --- a/tests/opnfv/test_cases/opnfv_yardstick_tc006.yaml +++ b/tests/opnfv/test_cases/opnfv_yardstick_tc006.yaml @@ -13,7 +13,8 @@ description: > Yardstick TC006 config file; Measure volume storage IOPS, throughput and latency using fio with job file. -{% set directory = directory or "/FIO_Test" %} +{% set job_file_config = job_file_config or '["[random-writers]", ioengine=libaio, rw=randwrite, size=128m, bs=32k, direct=0, size=64m, numjobs=4]' %} +{% set directory = directory or '/FIO_Test' %} {% set volume_size = volume_size or 200 %} {% set provider = provider or none %} {% set physical_network = physical_network or 'physnet1' %} @@ -25,7 +26,10 @@ scenarios: - type: Fio options: - job_file: "job_file.ini" + # input the content of a fio job file directly + job_file_config: {{ job_file_config }} + # or input the job file name + #job_file: "job_file.ini" directory: {{ directory }} host: fio.yardstick-TC006 diff --git a/yardstick/benchmark/scenarios/storage/fio.py b/yardstick/benchmark/scenarios/storage/fio.py index 98fe26973..125bc7ed4 100644 --- a/yardstick/benchmark/scenarios/storage/fio.py +++ b/yardstick/benchmark/scenarios/storage/fio.py @@ -32,6 +32,10 @@ class Fio(base.Scenario): type: string unit: na default: None + job_file_config - content of job configuration file + type: list + unit: na + default: None directory - mount directoey for test volume type: string unit: na @@ -90,15 +94,26 @@ class Fio(base.Scenario): self.client.wait(timeout=600) self.job_file = self.options.get("job_file", None) + config_lines = self.options.get("job_file_config", None) if self.job_file: self.job_file_script = pkg_resources.resource_filename( "yardstick.resources", 'files/' + self.job_file) - # copy script to host + # copy job file to host self.client._put_file_shell(self.job_file_script, '~/job_file.ini') + elif config_lines: + LOG.debug("Job file configuration received, Fio job file will be created.") + self.job_file = 'tmp_job_file.ini' + self.job_file_script = pkg_resources.resource_filename( + "yardstick.resources", 'files/' + self.job_file) + with open(self.job_file_script, 'w') as f: + f.write('\n'.join(str(line) for line in config_lines)) + # copy job file to host + self.client._put_file_shell(self.job_file_script, '~/job_file.ini') else: + LOG.debug("No job file configuration received, Fio will use parameters.") self.target_script = pkg_resources.resource_filename( "yardstick.benchmark.scenarios.storage", Fio.TARGET_SCRIPT) |