Compare commits
1 Commits
master
...
am/add-scr
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0abb827406 |
3
backend/scripts/bench_throughput.lua
Normal file
3
backend/scripts/bench_throughput.lua
Normal file
@ -0,0 +1,3 @@
|
||||
wrk.method = "POST"
|
||||
wrk.body = '{"to_email": "amaury@gmail.com"}'
|
||||
wrk.headers["Content-Type"] = "application/json"
|
||||
15
backend/scripts/bench_throughput.sh
Executable file
15
backend/scripts/bench_throughput.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This script is used to benchmark the throughput of the server. It assumes 3
|
||||
# things:
|
||||
# 1. The server is running on localhost:8080.
|
||||
# 2. The wrk tool is installed. See https://github.com/wg/wrk.
|
||||
# 3. The bench_throughput.lua script is in the same folder as this script.
|
||||
|
||||
# Make sure bench_throughput.lua exists in current folder.
|
||||
if [ ! -f bench_throughput.lua ]; then
|
||||
echo "bench_throughput.lua not found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
wrk -t12 -c400 -d20s -s bench_throughput.lua http://localhost:8080/v0/check_email
|
||||
Loading…
x
Reference in New Issue
Block a user