From 5d15f5d42e4b59ad7cc26a18d426061beaa16b46 Mon Sep 17 00:00:00 2001 From: Alexander Maretskiy Date: Thu, 6 Oct 2016 16:55:48 +0300 Subject: [PATCH] [Plugins] Replace instance_dd_test.sh with instance_test.sh Legacy script instance_dd_test.sh (loads nova instance in vm scenarios) is replaced with new instance_test.sh, which does same job better and outputs detailed data for HTML report. Legacy script instance_dd_test.sh is removed. Change-Id: Iafe51b5f559e01a972a187dad9e2608f7efa8022 --- rally-jobs/extra/instance_dd_test.sh | 13 ------------- rally-jobs/nova.yaml | 4 ++-- rally-jobs/rally-mos.yaml | 2 +- rally-jobs/rally-neutron-existing-users.yaml | 2 +- rally-jobs/rally-neutron.yaml | 2 +- .../vm/boot-runcommand-delete-custom-image.json | 2 +- .../vm/boot-runcommand-delete-custom-image.yaml | 2 +- .../vm/boot-runcommand-delete-with-disk.json | 2 +- .../vm/boot-runcommand-delete-with-disk.yaml | 2 +- samples/tasks/support/README.rst | 13 +++++++------ samples/tasks/support/instance_dd_test.sh | 13 ------------- 11 files changed, 16 insertions(+), 41 deletions(-) delete mode 100644 rally-jobs/extra/instance_dd_test.sh delete mode 100644 samples/tasks/support/instance_dd_test.sh diff --git a/rally-jobs/extra/instance_dd_test.sh b/rally-jobs/extra/instance_dd_test.sh deleted file mode 100644 index e3bf23405a..0000000000 --- a/rally-jobs/extra/instance_dd_test.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -time_seconds(){ (time -p $1 ) 2>&1 |awk '/real/{print $2}'; } -file=/tmp/test.img -c=${1:-$SIZE} -c=${c:-1000} #default is 1GB -write_seq=$(time_seconds "dd if=/dev/zero of=$file bs=1M count=$c") -read_seq=$(time_seconds "dd if=$file of=/dev/null bs=1M count=$c") -[ -f $file ] && rm $file - -echo "{ - \"write_seq_${c}m\": $write_seq, - \"read_seq_${c}m\": $read_seq - }" diff --git a/rally-jobs/nova.yaml b/rally-jobs/nova.yaml index 0139562889..9d7817376b 100755 --- a/rally-jobs/nova.yaml +++ b/rally-jobs/nova.yaml @@ -969,7 +969,7 @@ size: 2 use_floating_ip: true command: - script_file: "~/.rally/extra/instance_dd_test.sh" + script_file: "~/.rally/extra/instance_test.sh" interpreter: "/bin/sh" username: "cirros" runner: @@ -992,7 +992,7 @@ name: {{image_name}} use_floating_ip: false command: - script_file: "~/.rally/extra/instance_dd_test.sh" + script_file: "~/.rally/extra/instance_test.sh" interpreter: "/bin/sh" username: "cirros" runner: diff --git a/rally-jobs/rally-mos.yaml b/rally-jobs/rally-mos.yaml index b1410e07de..64c0d33d19 100644 --- a/rally-jobs/rally-mos.yaml +++ b/rally-jobs/rally-mos.yaml @@ -311,7 +311,7 @@ floating_network: "{{external_net}}" use_floating_ip: true command: - script_file: "~/.rally/extra/instance_dd_test.sh" + script_file: "~/.rally/extra/instance_test.sh" interpreter: "/bin/sh" username: "cirros" runner: diff --git a/rally-jobs/rally-neutron-existing-users.yaml b/rally-jobs/rally-neutron-existing-users.yaml index 5668694ad5..fa3c429457 100644 --- a/rally-jobs/rally-neutron-existing-users.yaml +++ b/rally-jobs/rally-neutron-existing-users.yaml @@ -355,7 +355,7 @@ image: name: {{image_name}} command: - script_file: "~/.rally/extra/instance_dd_test.sh" + script_file: "~/.rally/extra/instance_test.sh" interpreter: "/bin/sh" username: "cirros" runner: diff --git a/rally-jobs/rally-neutron.yaml b/rally-jobs/rally-neutron.yaml index 93bd3e9fda..9f942d7cbb 100644 --- a/rally-jobs/rally-neutron.yaml +++ b/rally-jobs/rally-neutron.yaml @@ -525,7 +525,7 @@ image: name: {{image_name}} command: - script_file: "~/.rally/extra/instance_dd_test.sh" + script_file: "~/.rally/extra/instance_test.sh" interpreter: "/bin/sh" username: "cirros" runner: diff --git a/samples/tasks/scenarios/vm/boot-runcommand-delete-custom-image.json b/samples/tasks/scenarios/vm/boot-runcommand-delete-custom-image.json index 7b31005cd1..0e243de7a8 100644 --- a/samples/tasks/scenarios/vm/boot-runcommand-delete-custom-image.json +++ b/samples/tasks/scenarios/vm/boot-runcommand-delete-custom-image.json @@ -4,7 +4,7 @@ "args": { "flavor": {"name": "m1.small"}, "command": { - "remote_path": "./instance_dd_test.sh" + "remote_path": "./instance_test.sh" }, "username": "root", "userdata": "#cloud-config\ndisable_root: 0\nssh_pwauth: 1" diff --git a/samples/tasks/scenarios/vm/boot-runcommand-delete-custom-image.yaml b/samples/tasks/scenarios/vm/boot-runcommand-delete-custom-image.yaml index ff63773e64..d64fe0a2ca 100644 --- a/samples/tasks/scenarios/vm/boot-runcommand-delete-custom-image.yaml +++ b/samples/tasks/scenarios/vm/boot-runcommand-delete-custom-image.yaml @@ -3,7 +3,7 @@ - args: command: - remote_path: "./instance_dd_test.sh" + remote_path: "./instance_test.sh" flavor: name: m1.small userdata: "#cloud-config\ndisable_root: 0\nssh_pwauth: 1" diff --git a/samples/tasks/scenarios/vm/boot-runcommand-delete-with-disk.json b/samples/tasks/scenarios/vm/boot-runcommand-delete-with-disk.json index 54824dad39..f44214b23b 100644 --- a/samples/tasks/scenarios/vm/boot-runcommand-delete-with-disk.json +++ b/samples/tasks/scenarios/vm/boot-runcommand-delete-with-disk.json @@ -18,7 +18,7 @@ "force_delete": false, "command": { "interpreter": "/bin/sh", - "script_file": "samples/tasks/support/instance_dd_test.sh" + "script_file": "samples/tasks/support/instance_test.sh" }, "username": "cirros" }, diff --git a/samples/tasks/scenarios/vm/boot-runcommand-delete-with-disk.yaml b/samples/tasks/scenarios/vm/boot-runcommand-delete-with-disk.yaml index 49ab8b9a14..7ecc8104ea 100644 --- a/samples/tasks/scenarios/vm/boot-runcommand-delete-with-disk.yaml +++ b/samples/tasks/scenarios/vm/boot-runcommand-delete-with-disk.yaml @@ -15,7 +15,7 @@ force_delete: false command: interpreter: "/bin/sh" - script_file: "samples/tasks/support/instance_dd_test.sh" + script_file: "samples/tasks/support/instance_test.sh" username: "cirros" runner: type: "constant" diff --git a/samples/tasks/support/README.rst b/samples/tasks/support/README.rst index 6d2ba407b2..eef482dc11 100644 --- a/samples/tasks/support/README.rst +++ b/samples/tasks/support/README.rst @@ -1,11 +1,12 @@ instance_linpack.sh -============= +=================== + instance_linpack.sh, will kick off a CPU intensive workload within a OpenStack instance. This script will return the avg gflops and max gflops Linpack reports in a JSON format. To run this workload, the VM must have linpack installed prior to running. -instance_dd_test.sh -============= -instance_dd_test.sh, will kick off a IO intensive workload within an OpenStack instance. -This script will return the write and read performance dd was able to achieve in a -JSON format. +instance_test.sh +================ + +instance_test.sh loads server by spawning processes. Finally, it outputs +JSON data for HTML report charts, with values of CPU, memory and disk usage. diff --git a/samples/tasks/support/instance_dd_test.sh b/samples/tasks/support/instance_dd_test.sh deleted file mode 100644 index e3bf23405a..0000000000 --- a/samples/tasks/support/instance_dd_test.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -time_seconds(){ (time -p $1 ) 2>&1 |awk '/real/{print $2}'; } -file=/tmp/test.img -c=${1:-$SIZE} -c=${c:-1000} #default is 1GB -write_seq=$(time_seconds "dd if=/dev/zero of=$file bs=1M count=$c") -read_seq=$(time_seconds "dd if=$file of=/dev/null bs=1M count=$c") -[ -f $file ] && rm $file - -echo "{ - \"write_seq_${c}m\": $write_seq, - \"read_seq_${c}m\": $read_seq - }"