aboutsummaryrefslogtreecommitdiff
path: root/benchmark/http.sh
blob: 40d0c714c2131f254b692f98727edd53f2d3239c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/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