Current Behavior
add test results of python's fastest frameworks sanic and robyn,The speed of sanic is much faster than fastapi, and the production use is very stable, I tested the test results of sanic and robyn
Desired Behavior
Screenshots / Mockups
from sanic import Sanic
from sanic.response import text
app = Sanic("MyHelloWorldApp")
@app.get("/")
async def hello_world(request):
return text("Hello, world.")
app.run(port=5000, workers=16, access_log=False)
from robyn import Robyn
app = Robyn(__file__)
@app.get("/", const=True)
async def h(_):
return "Hello, world!"
app.start(port=5000, )
# run command: python robyn_.py --processes 16
Summary:
Success rate: 1.0000
Total: 4.4657 secs
Slowest: 0.0322 secs
Fastest: 0.0003 secs
Average: 0.0044 secs
Requests/sec: 22393.0927
Total data: 1.24 MiB
Size/request: 13 B
Size/sec: 284.29 KiB
Response time histogram:
0.001 [10097] |■■■■■■■■■■■■■■
0.002 [22291] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
0.004 [20434] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
0.005 [14467] |■■■■■■■■■■■■■■■■■■■■
0.006 [9893] |■■■■■■■■■■■■■■
0.007 [7173] |■■■■■■■■■■
0.008 [5820] |■■■■■■■■
0.009 [3814] |■■■■■
0.011 [2499] |■■■
0.012 [1477] |■■
0.013 [2035] |■■
Latency distribution:
10% in 0.0015 secs
25% in 0.0023 secs
50% in 0.0037 secs
75% in 0.0059 secs
90% in 0.0085 secs
95% in 0.0102 secs
99% in 0.0136 secs
Details (average, fastest, slowest):
DNS+dialup: 0.0056 secs, 0.0029 secs, 0.0091 secs
DNS-lookup: 0.0000 secs, 0.0000 secs, 0.0004 secs
Status code distribution:
[200] 100000 responses
2.robyn:oha --insecure -c 100 -n 100000 http://127.0.0.1:5000
Summary:
Success rate: 1.0000
Total: 2.1341 secs
Slowest: 0.0116 secs
Fastest: 0.0001 secs
Average: 0.0021 secs
Requests/sec: 46858.4073
Total data: 1.24 MiB
Size/request: 13 B
Size/sec: 594.88 KiB
Response time histogram:
0.001 [3522] |■■■■
0.001 [13508] |■■■■■■■■■■■■■■■■
0.002 [25660] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
0.002 [25131] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
0.003 [15750] |■■■■■■■■■■■■■■■■■■■
0.003 [8224] |■■■■■■■■■■
0.004 [4205] |■■■■■
0.004 [2134] |■■
0.005 [989] |■
0.006 [416] |
0.006 [461] |
Latency distribution:
10% in 0.0010 secs
25% in 0.0015 secs
50% in 0.0020 secs
75% in 0.0026 secs
90% in 0.0033 secs
95% in 0.0039 secs
99% in 0.0051 secs
Details (average, fastest, slowest):
DNS+dialup: 0.0047 secs, 0.0017 secs, 0.0078 secs
DNS-lookup: 0.0000 secs, 0.0000 secs, 0.0001 secs
Status code distribution:
[200] 100000 responses
Alternatives
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too