mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Add benchmarks for large request bodies and responses
This commit is contained in:
parent
4f30e09881
commit
860c17557c
6 changed files with 22 additions and 4 deletions
8
benchmarks/wrk/big_body.sh
Executable file
8
benchmarks/wrk/big_body.sh
Executable 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
6
benchmarks/wrk/big_response.sh
Executable 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
|
|
@ -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
|
||||
|
|
3
benchmarks/wrk/lua/big_body.lua
Normal file
3
benchmarks/wrk/lua/big_body.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
wrk.method = "POST"
|
||||
wrk.body = string.rep("body", 1000000)
|
||||
wrk.headers["Content-Type"] = "application/x-www-form-urlencoded"
|
|
@ -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
|
||||
|
|
1
test/rackup/big_response.ru
Normal file
1
test/rackup/big_response.ru
Normal file
|
@ -0,0 +1 @@
|
|||
run lambda { |env| [200, {"Content-Type" => "text/plain"}, ["Hello World" * 100_000]] }
|
Loading…
Reference in a new issue