Last active
October 2, 2015 04:59
-
-
Save bentonporter/db441c90425108d959a8 to your computer and use it in GitHub Desktop.
Python Flask profiling snippet
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 werkzeug.contrib.profiler import ProfilerMiddleware | |
app.config['PROFILE'] = True | |
app.wsgi_app = ProfilerMiddleware(app.wsgi_app, restrictions = [50]) | |
app.run(port=args.port, debug=True, extra_files=extra_files) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment