#!/bin/bash #dd if=/dev/zero of=file.txt count=1024 bs=1024 #dd if=/dev/zero of=file.txt count=1024 bs=1048576 set -e METHOD="$1" # Either 'sole' or 'naive' echo $METHOD INF=$(mktemp) OUTF=$(mktemp) EXE=../bin/encode_file LOG=run.$METHOD.log rm -f $LOG for size in 1 2 512 1024 2048 8192 32768 65536 131072 262144 524288 1048576 do for i in {1..100} do dd if=/dev/urandom of=$INF count=$size bs=1024 2> /dev/null t=$($EXE "--$METHOD" $INF $OUTF) echo -e "$size\t$t" >> $LOG done done rm $INF $OUTF