Added multiprocessing
This commit is contained in:
11
tests/performance/falcon/simple_server.py
Normal file
11
tests/performance/falcon/simple_server.py
Normal file
@@ -0,0 +1,11 @@
|
||||
# Run with: gunicorn --workers=1 --worker-class=meinheld.gmeinheld.MeinheldWorker falc:app
|
||||
|
||||
import falcon
|
||||
import ujson as json
|
||||
|
||||
class TestResource:
|
||||
def on_get(self, req, resp):
|
||||
resp.body = json.dumps({"test": True})
|
||||
|
||||
app = falcon.API()
|
||||
app.add_route('/', TestResource())
|
||||
@@ -15,5 +15,5 @@ app = Sanic("test")
|
||||
async def test(request):
|
||||
return json({"test": True})
|
||||
|
||||
|
||||
app.run(host="0.0.0.0", port=sys.argv[1])
|
||||
if __name__ == '__main__':
|
||||
app.run(host="0.0.0.0", port=sys.argv[1])
|
||||
|
||||
Reference in New Issue
Block a user