Skip to content

Instantly share code, notes, and snippets.

@kigawas

kigawas/fastapi_sanic_gin_bench.sh Secret

Last active Nov 12, 2020
Embed
What would you like to do?
$ wrk --latency -t20 -c50 -d15s http://0.0.0.0:10000/v1/article/1 # gin, raw SQL
Running 15s test @ http://0.0.0.0:10000/v1/article/1
20 threads and 50 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 26.67ms 36.10ms 262.55ms 80.01%
Req/Sec 229.77 186.15 1.41k 74.36%
Latency Distribution
50% 1.04ms
75% 51.56ms
90% 85.81ms
99% 115.71ms
68540 requests in 15.10s, 49.55MB read
Requests/sec: 4539.16
Transfer/sec: 3.28MB
$ wrk --latency -t20 -c50 -d15s http://0.0.0.0:8080/api/users/1/bake # fastapi, gino baked queries
Running 15s test @ http://0.0.0.0:8080/api/users/1/bake
20 threads and 50 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 9.13ms 6.12ms 119.89ms 93.59%
Req/Sec 228.59 61.55 500.00 74.03%
Latency Distribution
50% 8.05ms
75% 10.86ms
90% 13.86ms
99% 25.61ms
68289 requests in 15.05s, 9.70MB read
Requests/sec: 4536.47
Transfer/sec: 660.09KB
$ wrk --latency -t20 -c50 -d15s http://0.0.0.0:8010/api/users/1/raw # sanic, raw SQL
Running 15s test @ http://0.0.0.0:8010/api/users/1/raw
20 threads and 50 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 7.36ms 5.41ms 137.62ms 95.49%
Req/Sec 283.98 90.21 777.00 77.38%
Latency Distribution
50% 6.84ms
75% 8.66ms
90% 10.80ms
99% 19.79ms
84918 requests in 15.03s, 12.07MB read
Requests/sec: 5648.49
Transfer/sec: 821.90KB
@kigawas

This comment has been minimized.

Copy link
Owner Author

@kigawas kigawas commented Nov 11, 2020

Hardware environment:

iMac (Retina 5K, 27-inch, 2019), 3.7 GHz 6-Core Intel Core i5

@kigawas

This comment has been minimized.

Copy link
Owner Author

@kigawas kigawas commented Nov 12, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment