We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b2b5e32 commit db59ab1Copy full SHA for db59ab1
1 file changed
examples/unfinished/benchmark/run-local.sh
@@ -23,7 +23,22 @@ pkill -f "$PROJDIR/.meteor/local/db" || true
23
../../../meteor --production --settings "scenarios/${SCENARIO}.json" --port 9000 &
24
OUTER_PID=$!
25
26
+echo "Waiting for server to come up"
27
+function wait_for_port {
28
+ local N=0
29
+ while ! curl -v "$1" 2>&1 | grep ' 200 ' > /dev/null ; do
30
+ sleep 1
31
+ N=$(($N+1))
32
+ if [ $N -ge $2 ] ; then
33
+ echo "Timed out waiting for port $1"
34
+ exit 2
35
+ fi
36
+ done
37
+}
38
+wait_for_port "http://localhost:9001" 60
39
40
+
41
+echo "Starting phantoms"
42
# start a bunch of phantomjs processes
43
PHANTOMSCRIPT=`mktemp -t benchmark-XXXXXXXX`
44
cat > "$PHANTOMSCRIPT" <<EOF
0 commit comments