forked from the-benchmarker/web-frameworks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
45 lines (38 loc) · 2.17 KB
/
run.sh
File metadata and controls
45 lines (38 loc) · 2.17 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
#docker-clean && digitalocean-clean && rm -fr .neph && mkdir -p .neph/{c,clojure,cpp,crystal,csharp,dart,elixir,fsharp,go,haskell,java,javascript,julia,kotlin,nim,pony,python,ruby,rust,scala,swift} && dropdb -U postgres benchmark && createdb -U postgres benchmark && psql -U postgres benchmark < .ci/dump.sql && PROVIDER=digitalocean rake config && bin/neph --seq
#. .env/default
#. .env/development
#
#doctl compute droplet create sieger --region ${DO_REGION} --image ${DO_IMAGE} --size ${DO_SIZE} --wait --ssh-keys ${DO_FINGERPRINT} --enable-private-networking
#sleep 30
#IP=$(doctl compute droplet list sieger --format PublicIPv4 --no-header)
#rsync -avz -e "ssh -i ${DO_KEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress * root@${IP}:/root
#scp -i ${DO_KEY} -r .ci root@${IP}:/root/
#scp -i ${DO_KEY} -r .env root@${IP}:/root/.env
#scp -i ${DO_KEY} ${DO_KEY} root@${IP}:${DO_KEY}
#doctl compute ssh --ssh-key-path ${DO_KEY} sieger
BASEDIR=`pwd`
# Clean database
#dropdb -U postgres benchmark
#createdb -U postgres benchmark
#psql -U postgres -d benchmark < dump.sql
find $1 -mindepth 1 -type f -name config.yaml | grep -Ev "yada|hunt" > /tmp/list.txt
while read line ; do
echo "*********** ${line} *************"
LANGUAGE=`echo $line | awk -F '/' '{print $(NF-2)}'`
FRAMEWORK=`echo $line | awk -F '/' '{print $(NF-1)}'`
# cd ${LANGUAGE}/${FRAMEWORK}
make -f ${BASEDIR}/${LANGUAGE}/${FRAMEWORK}/.Makefile build
# cd ../..
rm -fr ${BASEDIR}/${LANGUAGE}/${FRAMEWORK}/.results
mkdir -p ${BASEDIR}/${LANGUAGE}/${FRAMEWORK}/.results/{64,256,512}
sleep 30
make -f ${BASEDIR}/${LANGUAGE}/${FRAMEWORK}/.Makefile warmup
make -f ${BASEDIR}/${LANGUAGE}/${FRAMEWORK}/.Makefile collect
#make -f ${BASEDIR}/${LANGUAGE}/${FRAMEWORK}/.Makefile clean
#docker ps -aq | xargs --no-run-if-empty docker rm -f;
#docker images -aq | xargs --no-run-if-empty docker rmi -f;
#sudo docker system prune -a -f
make -f ${BASEDIR}/${LANGUAGE}/${FRAMEWORK}/.Makefile unbuild
done < /tmp/list.txt
#echo 'select label from frameworks' | psql -U postgres -d benchmark -t | sort > /tmp/done.txt
#find . -mindepth 3 -type f -name config.yaml | awk -F '/' '{print $(NF-1)}' | sort > all.txt