Skip to content

Instantly share code, notes, and snippets.

@bigeasy
Created June 12, 2012 02:20
Show Gist options
  • Save bigeasy/2913985 to your computer and use it in GitHub Desktop.
Save bigeasy/2913985 to your computer and use it in GitHub Desktop.
performance of http_simple.js
PORT=6000 /tmp/node-v0.6 benchmark/http_simple.js &
pid=$!
sleep 1
for i in {0..2}; do
ab -t 30 -c 100 http://127.0.0.1:6000/bytes/123 2>/dev/null | grep Req
done
kill $pid
sleep 60
PORT=8000 /tmp/node-master benchmark/http_simple.js &
pid=$!
sleep 1
for i in {0..2}; do
ab -t 30 -c 100 http://127.0.0.1:8000/bytes/123 2>/dev/null | grep Req
done
kill $pid
Ran on MacBook Pro 2.2 GHz Intel Core i7 with 8 GB RAM running 10.7.4.
$ bash foo.sh
pid 59347
Listening at http://127.0.0.1:6000/
create stored[n]
Requests per second: 2899.91 [#/sec] (mean)
Requests per second: 2006.98 [#/sec] (mean)
Requests per second: 1545.29 [#/sec] (mean)
pid 59356
Listening at http://127.0.0.1:8000/
create stored[n]
Requests per second: 3047.02 [#/sec] (mean)
Requests per second: 1771.55 [#/sec] (mean)
Requests per second: 1939.36 [#/sec] (mean)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment