bench: fetch port from env

http_simple.js honors $PORT, http_simple_bench.sh should too.
This commit is contained in:
jbergstroem 2011-11-14 14:43:49 +01:00 committed by Ben Noordhuis
parent c492d43f48
commit 8eccc417a7

View File

@ -1,7 +1,7 @@
#!/bin/bash
SERVER=127.0.0.1
PORT=8000
PORT=${PORT:=8000}
# You may want to configure your TCP settings to make many ports available
# to node and ab. On macintosh use:
@ -19,9 +19,6 @@ if [ $SERVER == "127.0.0.1" ]; then
sleep 1
fi
info=`curl -s http://$SERVER:$PORT/info`
eval $info
date=`date "+%Y%m%d%H%M%S"`
ab_hello_world() {