5 # ApacheBench (ab) is commonly installed in the sbin paths in Debian-based
7 AB
="$(which ab 2>/dev/null || :)"
10 AB
=$
(PATH
=/usr
/local
/sbin
:/usr
/sbin
:$PATH which ab
2>/dev
/null ||
:)
15 t_info
"skipping $T since 'ab' could not be found"
19 t_plan
4 "quiet spurious wakeups for $model"
21 t_begin
"setup and start" && {
23 echo "preload_app true" >> $unicorn_config
24 echo "worker_processes $nr" >> $unicorn_config
25 rainbows
-D env.ru
-c $unicorn_config -E none
29 t_begin
"spam the server with requests" && {
30 $AB -c1 -n100 http
://$listen/
33 t_begin
"killing succeeds" && {
34 kill -QUIT $rainbows_pid
37 t_begin
"check stderr" && {