rally/rally-jobs/extra/instance_dd_test.sh
Pavel Boldin d4b126425c Add command-dict option to specify command args
Add a command-dict option `command_args' that can be used to specify
a remote command arguments.

Change-Id: I8eab6ea604c111561f34e5534ec04cdeb69ccfe1
Implements: blueprint vm-workloads-framework
2015-07-15 19:37:39 +03:00

14 lines
381 B
Bash

#!/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
}"