Skip to content

Instantly share code, notes, and snippets.

@jayzeng
Created December 2, 2015 21:41
Show Gist options
  • Save jayzeng/465ee0bb3183a7e29288 to your computer and use it in GitHub Desktop.
Save jayzeng/465ee0bb3183a7e29288 to your computer and use it in GitHub Desktop.
Enable flask profiling
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