summaryrefslogtreecommitdiff
path: root/catlfish-benchmark/bench.sh
blob: 126b4af51bec73e2aa6e4bb48b252c029e85a941 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#! /bin/sh

iterations=2
chunksize=10000
[ -n "$1" ] && { ierations=$1; shift; }
[ -n "$1" ] && { chunksize=$1; shift; }

erlbase=/usr/local/catlfish

for nodename in mergebackup signing fest; do
    mkdir -p /var/run/catlfish/erlang_log/$nodename
    echo "Starting $nodename"
    $erlbase/bin/run_erl -daemon \
        /var/run/catlfish/ \
        /var/run/catlfish/erlang_log/$nodename/ \
        "exec $erlbase/bin/erl -config $nodename"
done

for iter in $iterations; do
    echo "Iteration ${iter}/${iterations} starting"

    ./submit.sh $chunksize

    echo "$0: merging"
    date
    python /usr/local/src/catlfish/tools/merge.py \
           --config /usr/local/etc/catlfish/catlfish.cfg \
           --localconfig /usr/local/etc/catlfish/merge.cfg \
           --timing
    date

    echo "Iteration ${iter}/${iterations} finished"
done