refactor: enable profiler from env variable
This commit is contained in:
parent
1a30e11b5f
commit
d8d86f7498
1 changed files with 1 additions and 1 deletions
|
|
@ -286,7 +286,7 @@ def serve(port=8000, profile=False, no_reload=False, no_threading=False, site=No
|
|||
|
||||
from werkzeug.serving import run_simple
|
||||
|
||||
if profile:
|
||||
if profile or os.environ.get('USE_PROFILER'):
|
||||
application = ProfilerMiddleware(application, sort_by=('cumtime', 'calls'))
|
||||
|
||||
if not os.environ.get('NO_STATICS'):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue