Updated performance tests
This commit is contained in:
parent
49c499f44d
commit
22cb8b858f
12
tests/performance/python/falcon.py
Normal file
12
tests/performance/python/falcon.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
# launch with
|
||||
# gunicorn --workers=1 --worker-class=meinheld.gmeinheld.MeinheldWorker falcon:api
|
||||
import sys
|
||||
import falcon
|
||||
import ujson as json
|
||||
|
||||
class Resource:
|
||||
def on_get(self, req, resp):
|
||||
resp.body = json.dumps({"test": True})
|
||||
|
||||
api = falcon.API()
|
||||
api.add_route('/', Resource())
|
17
tests/performance/python/flask.py
Normal file
17
tests/performance/python/flask.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
# launch with
|
||||
# gunicorn --workers=1 --worker-class=meinheld.gmeinheld.MeinheldWorker falcon:api
|
||||
from flask import Flask
|
||||
app = Flask(__name__)
|
||||
from ujson import dumps
|
||||
|
||||
import logging
|
||||
log = logging.getLogger('werkzeug')
|
||||
log.setLevel(logging.ERROR)
|
||||
|
||||
@app.route('/')
|
||||
def hello_world():
|
||||
return dumps({"test": True})
|
||||
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
app.run(port=sys.argv[-1])
|
Loading…
Reference in New Issue
Block a user