Created
December 2, 2015 21:41
-
-
Save jayzeng/465ee0bb3183a7e29288 to your computer and use it in GitHub Desktop.
Enable flask profiling
This file contains hidden or 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
from app import app | |
from werkzeug.contrib.profiler import ProfilerMiddleware | |
if __name__ == '__main__': | |
app.config['PROFILE'] = True | |
app.wsgi_app = ProfilerMiddleware(app.wsgi_app, restrictions=[30]) | |
app.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment