2 time_seconds(){ (time -p $1 ) 2>&1 |awk '/real/{print $2}'; }
5 c=${c:-1000} #default is 1GB
6 write_seq=$(time_seconds "dd if=/dev/zero of=$file bs=1M count=$c")
7 read_seq=$(time_seconds "dd if=$file of=/dev/null bs=1M count=$c")
8 [ -f $file ] && rm $file
11 \"write_seq_${c}m\": $write_seq,
12 \"read_seq_${c}m\": $read_seq