0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/benchmark/http.sh
isaacs 8a946c2ee7 benchmark: Backport improvements made in master
Ported to v0.6 for easier comparison in the 0.8.0 blog post.
2012-06-23 10:03:12 -07:00

13 lines
363 B
Bash
Executable File

#!/bin/bash
cd "$(dirname "$(dirname $0)")"
sudo sysctl -w net.inet.ip.portrange.first=12000
sudo sysctl -w net.inet.tcp.msl=1000
sudo sysctl -w kern.maxfiles=1000000 kern.maxfilesperproc=1000000
ulimit -n 100000
./node benchmark/http_simple.js || exit 1 &
sleep 1
ab -n 30000 -c 100 http://127.0.0.1:8000/${TYPE:-bytes}/${LENGTH:-1024} | grep Req
killall node