Merge pull request #63 from blakev/feature/performance-tornado
Adds `tornado` test server for speed comparison (#13)
This commit is contained in:
commit
b6a06afdc0
|
@ -9,3 +9,4 @@ gunicorn
|
||||||
bottle
|
bottle
|
||||||
kyoukai
|
kyoukai
|
||||||
falcon
|
falcon
|
||||||
|
tornado
|
19
tests/performance/tornado/simple_server.py
Normal file
19
tests/performance/tornado/simple_server.py
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# Run with: python simple_server.py
|
||||||
|
import ujson
|
||||||
|
from tornado import ioloop, web
|
||||||
|
|
||||||
|
|
||||||
|
class MainHandler(web.RequestHandler):
|
||||||
|
def get(self):
|
||||||
|
self.write(ujson.dumps({'test': True}))
|
||||||
|
|
||||||
|
|
||||||
|
app = web.Application([
|
||||||
|
(r'/', MainHandler)
|
||||||
|
], debug=False,
|
||||||
|
compress_response=False,
|
||||||
|
static_hash_cache=True
|
||||||
|
)
|
||||||
|
|
||||||
|
app.listen(8000)
|
||||||
|
ioloop.IOLoop.current().start()
|
Loading…
Reference in New Issue
Block a user