Created
November 7, 2015 07:50
-
-
Save ninjadq/bf2a5041b83377fc9c52 to your computer and use it in GitHub Desktop.
flask profile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!flask/bin/python | |
from werkzeug.contrib.profiler import ProfilerMiddleware | |
from app import app | |
app.config['PROFILE'] = True | |
app.wsgi_app = ProfilerMiddleware(app.wsgi_app, restrictions=[30]) ## to show the 30 most expensive functions for each request | |
app.run(debug = True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment