Make each test a subsection. Refactor update script.

This commit is contained in:
Bill Thiede 2020-04-04 07:20:51 -07:00
parent 0956ec54ca
commit 7d88de4963
2 changed files with 51 additions and 36 deletions

View File

@ -1,66 +1,72 @@
# Benchmark results
## Sleep: `wrk -t 16 -d 5 -c 16 http://localhost:3030/sleep/1`
## Sleep:
### `wrk -t 16 -d 5 -c 16 http://localhost:3030/sleep/1`
```
Running 5s test @ http://localhost:3030/sleep/1
16 threads and 16 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.00s 702.81us 1.00s 58.46%
Req/Sec 0.25 0.43 1.00 75.38%
65 requests in 5.01s, 8.63KB read
Requests/sec: 12.97
Transfer/sec: 1.72KB
Latency 1.00s 332.22us 1.00s 68.75%
Req/Sec 0.50 0.50 1.00 100.00%
64 requests in 5.01s, 8.50KB read
Requests/sec: 12.78
Transfer/sec: 1.70KB
```
## Sleep: `wrk -t 16 -d 5 -c 32 http://localhost:3030/sleep/1`
## Sleep:
### `wrk -t 16 -d 5 -c 32 http://localhost:3030/sleep/1`
```
Running 5s test @ http://localhost:3030/sleep/1
16 threads and 32 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.00s 520.18us 1.00s 75.38%
Req/Sec 1.89 2.51 10.00 91.67%
130 requests in 5.01s, 17.27KB read
Requests/sec: 25.96
Transfer/sec: 3.45KB
Latency 1.00s 519.72us 1.00s 68.75%
Req/Sec 2.34 2.92 10.00 87.67%
128 requests in 5.01s, 17.00KB read
Requests/sec: 25.57
Transfer/sec: 3.40KB
```
## Sleep: `wrk -t 16 -d 5 -c 64 http://localhost:3030/sleep/1`
## Sleep:
### `wrk -t 16 -d 5 -c 64 http://localhost:3030/sleep/1`
```
Running 5s test @ http://localhost:3030/sleep/1
16 threads and 64 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.00s 1.50ms 1.01s 67.58%
Req/Sec 3.20 0.41 4.00 79.69%
Latency 1.00s 1.64ms 1.01s 72.27%
Req/Sec 3.52 3.38 30.00 96.92%
256 requests in 5.01s, 34.00KB read
Requests/sec: 51.13
Transfer/sec: 6.79KB
```
## Sleep: `wrk -t 16 -d 5 -c 128 http://localhost:3030/sleep/1`
## Sleep:
### `wrk -t 16 -d 5 -c 128 http://localhost:3030/sleep/1`
```
Running 5s test @ http://localhost:3030/sleep/1
16 threads and 128 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.00s 1.25ms 1.01s 66.41%
Req/Sec 8.06 7.86 70.00 96.92%
Latency 1.00s 0.96ms 1.01s 70.70%
Req/Sec 10.38 15.10 70.00 94.12%
512 requests in 5.01s, 68.00KB read
Requests/sec: 102.24
Transfer/sec: 13.58KB
Requests/sec: 102.17
Transfer/sec: 13.57KB
```
## Spin: `wrk -t 16 -d 5 -c 16 http://localhost:3030/spin/1`
## Spin:
### `wrk -t 16 -d 5 -c 16 http://localhost:3030/spin/1`
```
Running 5s test @ http://localhost:3030/spin/1
16 threads and 16 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.00s 0.00us 1.00s 100.00%
Req/Sec 0.00 0.00 0.00 100.00%
5 requests in 5.01s, 760.00B read
Req/Sec 0.20 0.45 1.00 80.00%
5 requests in 5.10s, 760.00B read
Socket errors: connect 0, read 0, write 0, timeout 4
Requests/sec: 1.00
Transfer/sec: 151.79B
Requests/sec: 0.98
Transfer/sec: 149.02B
```

View File

@ -1,5 +1,11 @@
#!/usr/bin/env bash
function block_quote() {
echo "\`\`\`"
$*
echo "\`\`\`"
}
cargo build --release
echo "Running webserver on port :3030"
./target/release/warptest &
@ -9,19 +15,22 @@ echo "PID ${PID:?}"
echo "# Benchmark results" > README.md
for CONNECTIONS in 16 32 64 128; do
SLEEP_CMD="wrk -t 16 -d 5 -c ${CONNECTIONS} http://localhost:3030/sleep/1"
echo "## Sleep: \`${SLEEP_CMD:?}\`" >> README.md
echo "" >> README.md
echo "\`\`\`" >> README.md
${SLEEP_CMD:?} >> README.md
echo "\`\`\`" >> README.md
echo "" >> README.md
{
echo "## Sleep:"
echo "### \`${SLEEP_CMD:?}\`"
echo ""
block_quote ${SLEEP_CMD:?}
echo ""
} >> README.md
done
SPIN_CMD="wrk -t 16 -d 5 -c 16 http://localhost:3030/spin/1"
echo "## Spin: \`${SPIN_CMD:?}\`" >> README.md
echo "" >> README.md
echo "\`\`\`" >> README.md
${SPIN_CMD:?} >> README.md
echo "\`\`\`" >> README.md
{
echo "## Spin:"
echo "### \`${SPIN_CMD:?}\`"
echo ""
block_quote ${SPIN_CMD:?}
echo ""
} >> README.md
echo "Killing webserver"
kill ${PID:?}