diff --git a/examples/app_cprofile.py b/examples/app_cprofile.py new file mode 100644 index 00000000..e9f7d3fd --- /dev/null +++ b/examples/app_cprofile.py @@ -0,0 +1,9 @@ +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)