Added wheezy to benchmarks
This commit is contained in:
parent
993d81090c
commit
1d519ff407
|
@ -11,6 +11,7 @@ All tests were run on a AWS medium instance running ubuntu, using 1 process. Ea
|
||||||
| Server | Implementation | Requests/sec | Avg Latency |
|
| Server | Implementation | Requests/sec | Avg Latency |
|
||||||
| ------- | ------------------- | ------------:| -----------:|
|
| ------- | ------------------- | ------------:| -----------:|
|
||||||
| Sanic | Python 3.5 + uvloop | 29,128 | 3.40ms |
|
| Sanic | Python 3.5 + uvloop | 29,128 | 3.40ms |
|
||||||
|
| Wheezy | gunicorn + meinheld | 20,244 | 4.94ms |
|
||||||
| Falcon | gunicorn + meinheld | 18,972 | 5.27ms |
|
| Falcon | gunicorn + meinheld | 18,972 | 5.27ms |
|
||||||
| Flask | gunicorn + meinheld | 4,988 | 20.08ms |
|
| Flask | gunicorn + meinheld | 4,988 | 20.08ms |
|
||||||
| Aiohttp | Python 3.5 + uvloop | 2,974 | 33.49ms |
|
| Aiohttp | Python 3.5 + uvloop | 2,974 | 33.49ms |
|
||||||
|
|
46
tests/performance/wheezy/simple_server.py
Normal file
46
tests/performance/wheezy/simple_server.py
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
# Run with: gunicorn --workers=1 --worker-class=meinheld.gmeinheld.MeinheldWorker simple_server:main
|
||||||
|
""" Minimal helloworld application.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from wheezy.http import HTTPResponse
|
||||||
|
from wheezy.http import WSGIApplication
|
||||||
|
from wheezy.http.response import json_response
|
||||||
|
from wheezy.routing import url
|
||||||
|
from wheezy.web.handlers import BaseHandler
|
||||||
|
from wheezy.web.middleware import bootstrap_defaults
|
||||||
|
from wheezy.web.middleware import path_routing_middleware_factory
|
||||||
|
|
||||||
|
import ujson
|
||||||
|
|
||||||
|
class WelcomeHandler(BaseHandler):
|
||||||
|
|
||||||
|
def get(self):
|
||||||
|
response = HTTPResponse(content_type='application/json; charset=UTF-8')
|
||||||
|
response.write(ujson.dumps({"test":True}))
|
||||||
|
return response
|
||||||
|
|
||||||
|
all_urls = [
|
||||||
|
url('', WelcomeHandler, name='default'),
|
||||||
|
# url('', welcome, name='welcome')
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
options = {}
|
||||||
|
main = WSGIApplication(
|
||||||
|
middleware=[
|
||||||
|
bootstrap_defaults(url_mapping=all_urls),
|
||||||
|
path_routing_middleware_factory
|
||||||
|
],
|
||||||
|
options=options
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
import sys
|
||||||
|
from wsgiref.simple_server import make_server
|
||||||
|
try:
|
||||||
|
print('Visit http://localhost:{}/'.format(sys.argv[-1]))
|
||||||
|
make_server('', int(sys.argv[-1]), main).serve_forever()
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
pass
|
||||||
|
print('\nThanks!')
|
Loading…
Reference in New Issue
Block a user