Add benchmarks for large request bodies and responses

This commit is contained in:
Nate Berkopec 2019-10-13 11:15:18 +02:00
parent 4f30e09881
commit 860c17557c
No known key found for this signature in database
GPG Key ID: BDD7A4B8E43906A6
6 changed files with 22 additions and 4 deletions

8
benchmarks/wrk/big_body.sh Executable file
View File

@ -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

6
benchmarks/wrk/big_response.sh Executable file
View File

@ -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

View File

@ -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

View File

@ -0,0 +1,3 @@
wrk.method = "POST"
wrk.body = string.rep("body", 1000000)
wrk.headers["Content-Type"] = "application/x-www-form-urlencoded"

View File

@ -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

View File

@ -0,0 +1 @@
run lambda { |env| [200, {"Content-Type" => "text/plain"}, ["Hello World" * 100_000]] }