rally/rally-scenarios/extra/instance_dd_test.sh
Bruno Semperlotti fcfb66d468 Update Rally gates to support VM scenarios
Add "extra" directory for rally scenarios in gates. All files
from this directory will be copy pasted so we will be able to use
them in gates, because the path will be determined.

Also, print information about test environnement like available
services, flavors, images, networks, security groups and keypairs.

Change-Id: I19dd861beb11fb7ffdcf353f69759d841e7e8a01
2014-06-18 14:25:37 +04:00

13 lines
353 B
Bash

#!/bin/sh
time_seconds(){ (time -p $1 ) 2>&1 |awk '/real/{print $2}'; }
file=/tmp/test.img
c=1000 #1GB
write_seq_1gb=$(time_seconds "dd if=/dev/zero of=$file bs=1M count=$c")
read_seq_1gb=$(time_seconds "dd if=$file of=/dev/null bs=1M")
[ -f $file ] && rm $file
echo "{
\"write_seq_1gb\": $write_seq_1gb,
\"read_seq_1gb\": $read_seq_1gb
}"