#!/bin/bash

for i in / /direct/ /redirect /error /auth /additions /mirror; do
	echo "Testing $i"
	# Reload nginx to make sure there are no surviving keepalive connections
	nginx -s reload
	# Reset our keepalive counter
	curl -s localhost:8080/reset
	# Let the reload happen
	sleep 5
	# Run the test
	ab -k -n 10000 -c 50 http://localhost:81$i &> /dev/null
	# And grab the results
	curl -s localhost:8080/get
	echo
done
