-
Notifications
You must be signed in to change notification settings - Fork 160
Expand file tree
/
Copy pathhello_world.sh
More file actions
50 lines (39 loc) · 1.11 KB
/
hello_world.sh
File metadata and controls
50 lines (39 loc) · 1.11 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
#!/bin/sh
# exit on failure - use during development
#set -e
cd `dirname $0`
. ./_functions.sh
stack="$1"
bm_name=`basename $0 .sh`
if [ "$stack" = "local" ]; then
base="http://127.0.0.1/php-framework-benchmark"
fi
if [ "$stack" = "docker_nginx_php_5_6_4" ]; then
base="http://nginx_php_5_6_4/php-framework-benchmark"
fi
if [ "$stack" = "docker_nginx_hhvm_3_10_1" ]; then
base="http://nginx_hhvm_3_10_1/php-framework-benchmark"
fi
if [ "$stack" = "docker_nginx_php_7_0_0" ]; then
base="http://nginx_php_7_0_0/php-framework-benchmark"
fi
output_dir="output/$stack"
results_file="$output_dir/results.$bm_name.log"
check_file="$output_dir/check.$bm_name.log"
error_file="$output_dir/error.$bm_name.log"
url_file="$output_dir/urls.log"
cd ..
mkdir -p "$output_dir"
mv "$results_file" "$results_file.old" || true
mv "$check_file" "$check_file.old" || true
mv "$error_file" "$error_file.old" || true
mv "$url_file" "$url_file.old" || true
for fw in `echo $targets`
do
if [ -d "$fw" ]; then
echo "$fw"
. "$fw/_benchmark/hello_world.sh"
benchmark "$fw" "$url"
fi
done
cat "$error_file" || true