rally/rally-jobs/extra/instance_dd_test.sh
Boris Pavlovic 98dc6b9a7a Rename rally-scenarios to rally-jobs & add readme
This patch renames misleading rally-scenarios to rally-jobs.
rally-jobs describes much better purpose of this directory

Add readme files that describes structure and meanings of files
and directories

Change-Id: I8f5a2816186a2cafd251981ba7ad50e631e548f5
Closes-bug: #1395502
2014-11-24 16:13:47 +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
}"