#!/bin/sh
# root:   kldload accf_http
# unpriv: ./srv 19000 120 &            # filtered listener
#         ./bench 0 8192 4 19000       # bulk control  (~0 sys time)
#         ./bench 1 8192 4 19000       # byte-at-a-time (kernel sys time spike)
#         ./bench 1 16384 4 19000      # 2x size => ~4x sys time (quadratic)
gcc -O2 -pipe -o bench bench.c || exit 1
gcc -O2 -pipe -o srv srv.c || exit 1
./srv 19000 120 >/tmp/srv.log 2>&1 &
sleep 1
./bench 0 8192 4 19000
./bench 1 8192 4 19000
./bench 1 16384 4 19000
pkill -f 'srv 19000'
