Skip to content

Instantly share code, notes, and snippets.

@bentonporter
Last active October 2, 2015 04:59
Show Gist options
  • Save bentonporter/db441c90425108d959a8 to your computer and use it in GitHub Desktop.
Save bentonporter/db441c90425108d959a8 to your computer and use it in GitHub Desktop.
Python Flask profiling snippet
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