Skip to content

Instantly share code, notes, and snippets.

@ninjadq
Created November 7, 2015 07:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ninjadq/bf2a5041b83377fc9c52 to your computer and use it in GitHub Desktop.
Save ninjadq/bf2a5041b83377fc9c52 to your computer and use it in GitHub Desktop.
flask profile
#!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