Skip to content

Commit

Permalink
Minor changes to run scripts, added node.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
snoyberg committed Mar 14, 2011
1 parent b231760 commit 36f8676
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 13 deletions.
6 changes: 3 additions & 3 deletions pong/nginx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

d=$(readlink -f $(dirname $0))

/usr/local/nginx/sbin/nginx -c $d/nginx.conf &
sudo /usr/local/nginx/sbin/nginx -c $d/nginx.conf &
nx=$!

httperf --hog --server=localhost --port=3000 --uri=/ --rate=1000 --num-conns=200 --num-calls=100 --burst-length=20
kill $nx
httperf --hog --server=localhost --port=3000 --uri=/ --rate=1000 --num-conns=200 --num-calls=100 --burst-length=20 > results/nginx
sudo kill $nx
7 changes: 7 additions & 0 deletions pong/node.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash -x

node node.js &
nx=$!

httperf --hog --server=localhost --port=3000 --uri=/ --rate=1000 --num-conns=200 --num-calls=100 --burst-length=20 > results/node
kill $nx
4 changes: 2 additions & 2 deletions pong/php.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ d=$(readlink -f $(dirname $0))

php-fpm -n

/usr/local/nginx/sbin/nginx -c $d/php.nginx.conf &
sudo /usr/local/nginx/sbin/nginx -c $d/php.nginx.conf &
nx=$!

httperf --hog --server=localhost --port=3000 --uri=/ --rate=1000 --num-conns=200 --num-calls=100 --burst-length=20 > results/php
kill $nx
sudo kill $nx

killall -KILL php-fpm
4 changes: 2 additions & 2 deletions pong/python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ py=$!

sleep 1

/usr/local/nginx/sbin/nginx -c $d/python.nginx.conf &
sudo /usr/local/nginx/sbin/nginx -c $d/python.nginx.conf &
nx=$!

httperf --hog --server=localhost --port=3000 --uri=/ --rate=1000 --num-conns=200 --num-calls=100 --burst-length=20 > results/python
kill $nx
sudo kill $nx
kill $py
6 changes: 4 additions & 2 deletions pong/runall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ mkdir -p results
cabal configure
cabal build

./snap.sh
./warp.sh
./snap.sh $*
./warp.sh $*
./php.sh
./python.sh
./node.sh
./nginx.sh
3 changes: 1 addition & 2 deletions pong/snap.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/bin/bash -x

./dist/build/snap/snap &
./dist/build/snap/snap $* &
nx=$!

httperf --hog --server=localhost --port=3000 --uri=/ --rate=1000 --num-conns=200 --num-calls=100 --burst-length=20 > results/snap
kill $nx

3 changes: 1 addition & 2 deletions pong/warp.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/bin/bash -x

./dist/build/warp/warp &
./dist/build/warp/warp $* &
nx=$!

httperf --hog --server=localhost --port=3000 --uri=/ --rate=1000 --num-conns=200 --num-calls=100 --burst-length=20 > results/warp
kill $nx

0 comments on commit 36f8676

Please sign in to comment.