8

私はこのコードでそれをテストしました:

from gevent import wsgi, monkey; monkey.patch_all()
from flask import Flask, url_for

app = Flask(__name__)

@app.route('/<int:n>')
def index(n):
    for i in xrange(n):
        url = url_for('index', n=i)
    return url 

wsgi.WSGIServer(('', 8000), app).serve_forever()

結果:

  • /1 Requests per second: 2721.94 [#/sec] (mean)
  • /10 Requests per second: 1080.16 [#/sec] (mean)
  • /100 Requests per second: 144.66 [#/sec] (mean)
4

1 に答える 1