diff --git a/benchmarks/wrk/big_body.sh b/benchmarks/wrk/big_body.sh new file mode 100755 index 00000000..6554d58d --- /dev/null +++ b/benchmarks/wrk/big_body.sh @@ -0,0 +1,8 @@ +# You are encouraged to use @ioquatix's wrk fork, located here: https://github.com/ioquatix/wrk + +bundle exec bin/puma -t 4 test/rackup/hello.ru & +PID1=$! +sleep 5 +wrk -c 4 -s benchmarks/wrk/lua/big_body.lua --latency http://localhost:9292 + +kill $PID1 diff --git a/benchmarks/wrk/big_response.sh b/benchmarks/wrk/big_response.sh new file mode 100755 index 00000000..2ecf5f51 --- /dev/null +++ b/benchmarks/wrk/big_response.sh @@ -0,0 +1,6 @@ +bundle exec bin/puma -t 4 test/rackup/big_response.ru & +PID1=$! +sleep 5 +wrk -c 4 -d 60 --latency http://localhost:9292 + +kill $PID1 diff --git a/benchmarks/wrk/hello.sh b/benchmarks/wrk/hello.sh index 56a52125..93783669 100755 --- a/benchmarks/wrk/hello.sh +++ b/benchmarks/wrk/hello.sh @@ -1,8 +1,8 @@ # You are encouraged to use @ioquatix's wrk fork, located here: https://github.com/ioquatix/wrk -bundle exec bin/puma -t 5 test/rackup/hello.ru & +bundle exec bin/puma -t 4 test/rackup/hello.ru & PID1=$! sleep 5 -wrk -c 5 --latency http://localhost:9292 +wrk -c 4 --latency http://localhost:9292 kill $PID1 diff --git a/benchmarks/wrk/lua/big_body.lua b/benchmarks/wrk/lua/big_body.lua new file mode 100644 index 00000000..953049b8 --- /dev/null +++ b/benchmarks/wrk/lua/big_body.lua @@ -0,0 +1,3 @@ +wrk.method = "POST" +wrk.body = string.rep("body", 1000000) +wrk.headers["Content-Type"] = "application/x-www-form-urlencoded" diff --git a/benchmarks/wrk/more_conns_than_threads.sh b/benchmarks/wrk/more_conns_than_threads.sh index 7ff47890..3f72f2d3 100755 --- a/benchmarks/wrk/more_conns_than_threads.sh +++ b/benchmarks/wrk/more_conns_than_threads.sh @@ -1,6 +1,6 @@ -bundle exec bin/puma -t 5 test/rackup/hello.ru & +bundle exec bin/puma -t 6 test/rackup/hello.ru & PID1=$! sleep 5 -wrk -c 10 --latency http://localhost:9292 +wrk -c 12 --latency http://localhost:9292 kill $PID1 diff --git a/test/rackup/big_response.ru b/test/rackup/big_response.ru new file mode 100644 index 00000000..8d5dee62 --- /dev/null +++ b/test/rackup/big_response.ru @@ -0,0 +1 @@ +run lambda { |env| [200, {"Content-Type" => "text/plain"}, ["Hello World" * 100_000]] }