fix timezones in darcs-fast-export, take 2
[girocco-darcs-fast-export.git] / t / bench.sh
bloba4b3d0d2c276cd251e34cc3b8864b1e2579b3b37
1 #!/bin/sh
3 # this is a test as well, but it would take a lot of time, so don't
4 # prefix it with 'test'.
6 . lib.sh
8 if [ ! -d darcs-benchmark ]; then
9 darcs get http://code.haskell.org/darcs/darcs-benchmark
10 cd darcs-benchmark
11 else
12 cd darcs-benchmark
13 darcs pull -a
15 sh initialise.sh
16 cd big-zoo
17 if [ -n "$1" ]; then
18 targets=$1
19 else
20 targets=*_play.tar.gz
22 for i in $targets
24 echo "benchmarking $i"
25 rm -rf _playground
26 tar xf $i
27 cd _playground
28 log="../$i.d-f-e-$(git describe).log"
29 sh -c 'time d2x -f git sandbox' 2>&1 |tee $log
30 darcs show repo --repodir sandbox |egrep -v 'Root|Cache|Default' >> $log
31 if diff_git sandbox >/dev/null; then
32 echo "ok, the result is correct" >> $log
33 else
34 echo "ouch, the result is corrupted" >> $log
35 exit 1
37 cd ..
38 done