This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
devicehub-teal/examples/app_cprofile.py
Cayo Puigdefabregas 9df81c2fad adding app_cprofile
2021-12-01 13:44:24 +01:00

10 lines
309 B
Python

from ereuse_devicehub.devicehub import Devicehub
from werkzeug.contrib.profiler import ProfilerMiddleware
app = Devicehub(inventory='dbtest')
app.config["SQLALCHEMY_RECORD_QUERIES"] = True
app.config['PROFILE'] = True
app.wsgi_app = ProfilerMiddleware(app.wsgi_app, restrictions=[30])
app.run(debug = True)