aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/rally/scenario/support
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-11-24 18:25:52 +0100
committerMorgan Richomme <morgan.richomme@orange.com>2016-11-25 15:09:35 +0100
commit165ff17205d99b18df36e5ac6f34ede858e3da17 (patch)
tree3199a34b651204cd62bdc78b5c5fc19c73ca3f02 /functest/opnfv_tests/openstack/rally/scenario/support
parent96aef41089d2c62913320028dd9618197d0e75c5 (diff)
file/dir renaming for consistency
JIRA: FUNCTEST-579 Change-Id: Iaa545db70bfb76770df0a3d17871e29ce518ff2d Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'functest/opnfv_tests/openstack/rally/scenario/support')
-rwxr-xr-xfunctest/opnfv_tests/openstack/rally/scenario/support/instance_dd_test.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/functest/opnfv_tests/openstack/rally/scenario/support/instance_dd_test.sh b/functest/opnfv_tests/openstack/rally/scenario/support/instance_dd_test.sh
new file mode 100755
index 00000000..e3bf2340
--- /dev/null
+++ b/functest/opnfv_tests/openstack/rally/scenario/support/instance_dd_test.sh
@@ -0,0 +1,13 @@
+#!/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
+ }"