profiler.py 413 B

12345678910111213141516
  1. from werkzeug.contrib.profiler import ProfilerMiddleware
  2. from lakesuperior.app import create_app
  3. from lakesuperior.config_parser import config
  4. fcrepo = create_app(config['application'], config['logging'])
  5. options = {
  6. 'restrictions': [30],
  7. 'profile_dir': '/tmp/lsup_profiling'
  8. }
  9. fcrepo.wsgi_app = ProfilerMiddleware(fcrepo.wsgi_app, **options)
  10. fcrepo.config['PROFILE'] = True
  11. fcrepo.run(debug = True)