fix: limit profiler output to 200 lines

This commit is contained in:
Sagar Vora 2025-03-20 08:37:51 +05:30
parent d76d24d0d3
commit 5d5092d6ae

View file

@ -477,7 +477,7 @@ def serve(
from werkzeug.serving import run_simple
if profile or os.environ.get("USE_PROFILER"):
application = ProfilerMiddleware(application, sort_by=("cumtime", "calls"))
application = ProfilerMiddleware(application, sort_by=("cumtime", "calls"), restrictions=(200,))
if not os.environ.get("NO_STATICS"):
application = application_with_statics()