Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]add test results of python's fastest frameworks sanic and robyn #256

Open
kitty-eu-org opened this issue Aug 2, 2022 · 2 comments

Comments

@kitty-eu-org
Copy link

kitty-eu-org commented Aug 2, 2022

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

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

Screenshots / Mockups

  • sanic code
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)
  • robyn code
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

From the results, robyn is twice as fast as sanic, but the performance of sanic is still very good. Finally, thank you for your contribution to robyn

@sansyrox
Copy link
Member

sansyrox commented Aug 2, 2022

@hezhaozhao-git , thank you for the stats.

Can you share the result of the command neofetch on your terminal too? So, that we can have the specs of the PC as a reference too?

@kitty-eu-org
Copy link
Author

kitty-eu-org commented Aug 3, 2022

@hezhaozhao-git , thank you for the stats.

Can you share the result of the command neofetch on your terminal too? So, that we can have the specs of the PC as a reference too?
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants