# HG changeset patch # User Chris Cannam # Date 1382114649 -3600 # Node ID 83e285b97c01b4442590ea2dce1eccb40467a4db # Parent 12a0c2e493c4e26a3808d362542545901c0ab768 Add timings diff -r 12a0c2e493c4 -r 83e285b97c01 run-tests.sh --- a/run-tests.sh Fri Oct 18 17:40:07 2013 +0100 +++ b/run-tests.sh Fri Oct 18 17:44:09 2013 +0100 @@ -13,7 +13,7 @@ factor="$1" infile="$2" outfile="$3" - sndfile-resample -to "$(($original/$factor))" "$infile" "$outfile" + time sndfile-resample -to "$(($original/$factor))" "$infile" "$outfile" } do_linear() { @@ -22,28 +22,28 @@ outfile="$3" echo "factor is $factor" echo "running... sndfile-resample -to $(($original/$factor)) -c 4 $infile $outfile" - sndfile-resample -to "$(($original/$factor))" -c 4 "$infile" "$outfile" + time sndfile-resample -to "$(($original/$factor))" -c 4 "$infile" "$outfile" } do_resample_hq() { factor="$1" infile="$2" outfile="$3" - "$mydir/garage-resampler/resample" --snr 100 --bandwidth 0.02 --to "$(($original/$factor))" "$infile" "$outfile" + time "$mydir/garage-resampler/resample" --snr 100 --bandwidth 0.02 --to "$(($original/$factor))" "$infile" "$outfile" } do_resample_mq() { factor="$1" infile="$2" outfile="$3" - "$mydir/garage-resampler/resample" --snr 70 --bandwidth 0.03 --to "$(($original/$factor))" "$infile" "$outfile" + time "$mydir/garage-resampler/resample" --snr 70 --bandwidth 0.03 --to "$(($original/$factor))" "$infile" "$outfile" } do_resample_lq() { factor="$1" infile="$2" outfile="$3" - "$mydir/garage-resampler/resample" --snr 50 --bandwidth 0.05 --to "$(($original/$factor))" "$infile" "$outfile" + time "$mydir/garage-resampler/resample" --snr 50 --bandwidth 0.05 --to "$(($original/$factor))" "$infile" "$outfile" } decimate_twice() { @@ -60,7 +60,7 @@ factor="$1" infile="$2" outfile="$3" - case "$factor" in + time case "$factor" in 16) decimate_twice 4 4 "$infile" "$outfile";; 32) decimate_twice 8 4 "$infile" "$outfile";; 64) decimate_twice 8 8 "$infile" "$outfile";; @@ -72,7 +72,8 @@ for f in $factors; do for impl in linear decimate resample_hq resample_mq resample_lq src; do - do_$impl "$f" "$mydir/infinitewave-testsignals/Swept_float.wav" "$mydir"/out/"$f"_"$impl".wav + echo "factor $f, impl $impl..." + do_$impl "$f" "$mydir/infinitewave-testsignals/Swept_float.wav" "$mydir"/out/"$f"_"$impl".wav > "$mydir"/out/"$f"_"$impl".log 2>&1 done done