2023-10-31 21:55:58 +02:00
|
|
|
#Note: Currently flask_debugtoolbar is not compatible with flask.
|
|
|
|
#import flask_debugtoolbar
|
2018-10-18 15:57:43 +02:00
|
|
|
|
2021-11-02 16:39:41 +02:00
|
|
|
from werkzeug.middleware.profiler import ProfilerMiddleware
|
2018-10-18 15:57:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
# Debugging toolbar
|
2023-10-31 21:55:58 +02:00
|
|
|
#toolbar = flask_debugtoolbar.DebugToolbarExtension()
|
2018-10-18 15:57:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
# Profiler
|
|
|
|
class Profiler(object):
|
2018-10-18 17:55:07 +02:00
|
|
|
def init_app(self, app):
|
2021-11-02 16:39:41 +02:00
|
|
|
app.wsgi_app = ProfilerMiddleware(
|
2018-10-18 15:57:43 +02:00
|
|
|
app.wsgi_app, restrictions=[30]
|
|
|
|
)
|
|
|
|
|
|
|
|
profiler = Profiler()
|