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
51 lines (48 loc) · 1.84 KB
/
Copy pathrun.sh
File metadata and controls
51 lines (48 loc) · 1.84 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
46
47
48
49
50
51
BASEDIR=`pwd`
# zrk is the load generator every `collect` target shells out to, and nothing
# in this repo installs it. Without this check a missing zrk surfaces as a
# "command not found" per framework, hours into a run, with empty .results and
# a `make` that kept going -- so fail here instead, before the first build.
if ! command -v zrk > /dev/null 2>&1; then
echo "zrk not found on PATH." >&2
echo "" >&2
echo "Install it with one of:" >&2
echo " brew install zoxy-io/tap/zrk" >&2
echo " https://github.com/zoxy-io/zrk/releases (static binaries)" >&2
echo "" >&2
echo "--closed (used by the collect targets) needs zrk >= 2.2.0." >&2
exit 1
fi
if [ "$#" -eq 0 ]; then
find . -mindepth 3 -type f -name config.yaml | grep -Ev 'imi-swoole|guildenstern' > ~/list.txt
else
COUNT=`echo $1 | grep -c "/"`
if [ "$COUNT" -eq 0 ]; then
find $1 -mindepth 2 -type f -name config.yaml > ~/list.txt
elif [ "$COUNT" -eq 1 ] ; then
find $1 -mindepth 1 -type f -name config.yaml > ~/list.txt
else
echo "Illegal number of parameters" >&2
exit 2
fi
fi
while read line ; do
echo "*********** ${line} *************"
LANGUAGE=`echo $line | awk -F '/' '{print $(NF-2)}'`
FRAMEWORK=`echo $line | awk -F '/' '{print $(NF-1)}'`
rm -fr ${BASEDIR}/${LANGUAGE}/${FRAMEWORK}/.results
mkdir -p ${BASEDIR}/${LANGUAGE}/${FRAMEWORK}/.results/{64,256,512}
make -f ${BASEDIR}/${LANGUAGE}/${FRAMEWORK}/.Makefile build
sleep 60
make -f ${BASEDIR}/${LANGUAGE}/${FRAMEWORK}/.Makefile test
ret=$?
if [ $ret -eq 0 ]; then
make -f ${BASEDIR}/${LANGUAGE}/${FRAMEWORK}/.Makefile warmup
# make -f ${BASEDIR}/${LANGUAGE}/${FRAMEWORK}/.Makefile memory-idle
make -f ${BASEDIR}/${LANGUAGE}/${FRAMEWORK}/.Makefile collect
sleep 5
else
echo "Failure in ${LANGUAGE}/${FRAMEWORK}"
fi
make -f ${BASEDIR}/${LANGUAGE}/${FRAMEWORK}/.Makefile unbuild
done < ~/list.txt