diff --git a/benchmarks/2021-12-02-115731_1920x1200_scrot.png b/benchmarks/2021-12-02-115731_1920x1200_scrot.png new file mode 100644 index 00000000..b522e9c1 Binary files /dev/null and b/benchmarks/2021-12-02-115731_1920x1200_scrot.png differ diff --git a/benchmarks/2021-12-02-120103_1920x1200_scrot.png b/benchmarks/2021-12-02-120103_1920x1200_scrot.png new file mode 100644 index 00000000..219de26c Binary files /dev/null and b/benchmarks/2021-12-02-120103_1920x1200_scrot.png differ diff --git a/benchmarks/user_dhub_new_version.txt b/benchmarks/user_dhub_new_version.txt new file mode 100644 index 00000000..001461e0 --- /dev/null +++ b/benchmarks/user_dhub_new_version.txt @@ -0,0 +1,257 @@ + * Serving Flask app "ereuse_devicehub" (lazy loading) + * Environment: production + WARNING: Do not use the development server in a production environment. + Use a production WSGI server instead. + * Debug mode: on +-------------------------------------------------------------------------------- +PATH: '/versions/' + 6874 function calls (6593 primitive calls) in 1.066 seconds + + Ordered by: internal time, call count + List reduced from 856 to 30 due to restriction <30> + + ncalls tottime percall cumtime percall filename:lineno(function) + 9 1.049 0.117 1.049 0.117 {method 'acquire' of '_thread.RLock' objects} + 9 0.004 0.000 0.004 0.000 {method 'execute' of 'psycopg2.extensions.cursor' objects} + 3 0.002 0.001 0.002 0.001 {method 'rollback' of 'psycopg2.extensions.connection' objects} + 1 0.002 0.002 0.002 0.002 {built-in method psycopg2._psycopg._connect} + 12/3 0.000 0.000 0.000 0.000 /usr/lib/python3.7/sre_parse.py:469(_parse) + 322 0.000 0.000 0.000 0.000 /usr/lib/python3.7/weakref.py:435(__contains__) + 65/2 0.000 0.000 0.000 0.000 {built-in method _abc._abc_subclasscheck} + 10 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/type_api.py:479(_cached_result_processor) + 243/241 0.000 0.000 0.000 0.000 {built-in method builtins.getattr} + 25/6 0.000 0.000 0.000 0.000 /usr/lib/python3.7/sre_parse.py:174(getwidth) + 94/82 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py:836(__get__) + 47 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/event/attr.py:166(update_subclass) + 435 0.000 0.000 0.000 0.000 {built-in method builtins.isinstance} + 22/3 0.000 0.000 0.000 0.000 /usr/lib/python3.7/sre_compile.py:71(_compile) + 5 0.000 0.000 0.003 0.001 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/base.py:1155(_execute_context) + 2 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/werkzeug/routing.py:1443(match) + 114 0.000 0.000 0.000 0.000 /usr/lib/python3.7/weakref.py:395(__getitem__) + 47 0.000 0.000 0.001 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/event/attr.py:227(__init__) + 103 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/werkzeug/routing.py:753(match) + 37/28 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py:909(__getattr__) + 73 0.000 0.000 0.000 0.000 {built-in method builtins.hasattr} + 47 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/event/attr.py:160(_assign_cls_collection) + 9 0.000 0.000 0.001 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/compiler.py:1716(_label_select_column) + 50 0.000 0.000 0.001 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/event/base.py:86() + 9 0.000 0.000 0.000 0.000 {method 'cursor' of 'psycopg2.extensions.connection' objects} + 27 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/werkzeug/local.py:160(top) + 10 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/compiler.py:826(visit_column) + 77 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/session.py:1339(_add_bind) + 32/4 0.000 0.000 0.001 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/visitors.py:84(_compiler_dispatch) + 5 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/selectable.py:2899(_froms) + + +-------------------------------------------------------------------------------- + +-------------------------------------------------------------------------------- +PATH: '/devices/' + 2869 function calls (2841 primitive calls) in 0.951 seconds + + Ordered by: internal time, call count + List reduced from 664 to 30 due to restriction <30> + + ncalls tottime percall cumtime percall filename:lineno(function) + 3 0.924 0.308 0.924 0.308 {method 'acquire' of '_thread.RLock' objects} + 1 0.012 0.012 0.012 0.012 {method 'rollback' of 'psycopg2.extensions.connection' objects} + 2 0.005 0.003 0.005 0.003 {method 'execute' of 'psycopg2.extensions.cursor' objects} + 1 0.003 0.003 0.003 0.003 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/event/attr.py:279(exec_once) + 1 0.002 0.002 0.002 0.002 {built-in method psycopg2._psycopg._connect} + 77 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/session.py:1339(_add_bind) + 83 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/inspection.py:37(inspect) + 2 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/werkzeug/routing.py:1443(match) + 72 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/werkzeug/routing.py:753(match) + 27 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/werkzeug/local.py:160(top) + 11 0.000 0.000 0.000 0.000 {method 'sub' of 're.Pattern' objects} + 1 0.000 0.000 0.924 0.924 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/base.py:401(_inspect_mapped_class) + 154 0.000 0.000 0.000 0.000 {built-in method builtins.isinstance} + 1 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/session.py:639(__init__) + 1 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/flask_sqlalchemy/__init__.py:917(get_tables_for_bind) + 86 0.000 0.000 0.000 0.000 {built-in method builtins.getattr} + 31 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/werkzeug/local.py:68(__getattr__) + 8 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/compiler.py:826(visit_column) + 3 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/selectable.py:2899(_froms) + 2 0.000 0.000 0.006 0.003 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/base.py:1048(_execute_clauseelement) + 2 0.000 0.000 0.006 0.003 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/base.py:1155(_execute_context) + 1 0.000 0.000 0.006 0.006 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/pool.py:693(__connect) + 2 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/visitors.py:221(iterate) + 80 0.000 0.000 0.000 0.000 {method 'search' of 're.Pattern' objects} + 7 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/compiler.py:1716(_label_select_column) + 158 0.000 0.000 0.000 0.000 {method 'get' of 'dict' objects} + 2 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/flask_sqlalchemy/__init__.py:109(_calling_context) + 2 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/default.py:622(_init_compiled) + 1 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/loading.py:337(_instance_processor) + 8 0.000 0.000 0.000 0.000 /usr/lib/python3.7/weakref.py:356(__init__) + + +-------------------------------------------------------------------------------- + +-------------------------------------------------------------------------------- +PATH: '/lots/' + 827262 function calls (801219 primitive calls) in 1.097 seconds + + Ordered by: internal time, call count + List reduced from 1182 to 30 due to restriction <30> + + ncalls tottime percall cumtime percall filename:lineno(function) + 3932 0.094 0.000 0.102 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/event/attr.py:330(__init__) + 468 0.043 0.000 0.512 0.001 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/strategies.py:39(_register_attribute) + 66949 0.036 0.000 0.042 0.000 {built-in method builtins.isinstance} + 6200 0.034 0.000 0.066 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/event/registry.py:67(_stored_in_collection) +6201/6200 0.028 0.000 0.264 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/event/registry.py:193(listen) + 2797 0.025 0.000 0.039 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/visitors.py:221(iterate) + 4269 0.025 0.000 0.040 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/elements.py:3030(__init__) +18666/10636 0.024 0.000 0.045 0.000 {built-in method builtins.hasattr} +16009/7963 0.024 0.000 0.053 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py:909(__getattr__) + 4067 0.024 0.000 0.129 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/attributes.py:1701(register_attribute_impl) + 4067 0.019 0.000 0.043 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/attributes.py:436(__init__) + 6200 0.019 0.000 0.312 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/event/api.py:33(listen) + 16707 0.018 0.000 0.018 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/annotation.py:99(__hash__) + 2032 0.017 0.000 0.139 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/mapper.py:2501(visit_binary) + 4236 0.015 0.000 0.122 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/annotation.py:102(__eq__) + 3380 0.014 0.000 0.051 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/attributes.py:761(__init__) + 2 0.014 0.007 0.014 0.007 {method 'execute' of 'psycopg2.extensions.cursor' objects} + 6200 0.014 0.000 0.030 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/event/api.py:22(_event_key) + 78379 0.013 0.000 0.013 0.000 {method 'pop' of 'dict' objects} + 27663 0.013 0.000 0.017 0.000 {built-in method builtins.getattr} + 4269 0.012 0.000 0.072 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/default_comparator.py:40(_boolean_compare) + 4206 0.012 0.000 0.020 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/elements.py:3050(__bool__) + 3436 0.011 0.000 0.020 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py:881(expire_instance) + 6200 0.010 0.000 0.202 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/event/registry.py:237(base_listen) +8572/4269 0.009 0.000 0.109 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/operators.py:358(__eq__) + 4269 0.009 0.000 0.082 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/type_api.py:63(operate) + 10464 0.009 0.000 0.015 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/base.py:220(manager_of_class) + 7736 0.009 0.000 0.009 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/instrumentation.py:193(_attr_has_impl) + 4504 0.009 0.000 0.020 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/mapper.py:1971(_log) + 1 0.009 0.009 0.009 0.009 {method 'rollback' of 'psycopg2.extensions.connection' objects} + + +-------------------------------------------------------------------------------- + +-------------------------------------------------------------------------------- +PATH: '/versions/' + 9206 function calls (9031 primitive calls) in 0.154 seconds + + Ordered by: internal time, call count + List reduced from 999 to 30 due to restriction <30> + + ncalls tottime percall cumtime percall filename:lineno(function) + 1 0.109 0.109 0.109 0.109 {method 'rollback' of 'psycopg2.extensions.connection' objects} + 3 0.024 0.008 0.024 0.008 {method 'execute' of 'psycopg2.extensions.cursor' objects} + 8 0.007 0.001 0.007 0.001 {built-in method posix.stat} + 1 0.001 0.001 0.001 0.001 {built-in method _socket.getaddrinfo} + 318 0.001 0.000 0.001 0.000 /usr/lib/python-exec/python3.7/../../../lib/python3.7/os.py:676(__getitem__) + 2 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/urllib3/exceptions.py:20(__init__) + 332 0.000 0.000 0.002 0.000 /usr/lib/python-exec/python3.7/../../../lib/python3.7/_collections_abc.py:742(__iter__) + 11 0.000 0.000 0.001 0.000 /usr/lib/python3.7/queue.py:121(put) + 630/629 0.000 0.000 0.000 0.000 {method 'decode' of 'bytes' objects} + 60/5 0.000 0.000 0.000 0.000 {built-in method _abc._abc_subclasscheck} + 312 0.000 0.000 0.000 0.000 /usr/lib/python-exec/python3.7/../../../lib/python3.7/os.py:699(__iter__) + 727 0.000 0.000 0.001 0.000 {built-in method builtins.isinstance} + 620 0.000 0.000 0.000 0.000 /usr/lib/python-exec/python3.7/../../../lib/python3.7/os.py:758(decode) + 2 0.000 0.000 0.002 0.001 /usr/lib/python3.7/urllib/request.py:2489(getproxies_environment) + 318 0.000 0.000 0.000 0.000 /usr/lib/python-exec/python3.7/../../../lib/python3.7/os.py:754(encode) + 112/111 0.000 0.000 0.000 0.000 {built-in method builtins.len} + 2 0.000 0.000 0.000 0.000 /usr/lib/python3.7/socket.py:139(__init__) + 342 0.000 0.000 0.000 0.000 {method 'encode' of 'str' objects} + 217 0.000 0.000 0.000 0.000 {method 'get' of 'dict' objects} + 26 0.000 0.000 0.000 0.000 /usr/lib/python-exec/python3.7/../../../lib/python3.7/abc.py:137(__instancecheck__) + 51 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/werkzeug/local.py:160(top) + 16 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/compiler.py:826(visit_column) + 172 0.000 0.000 0.000 0.000 {built-in method builtins.getattr} + 3 0.000 0.000 0.025 0.008 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/base.py:1155(_execute_context) + 1 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/flask_sqlalchemy/__init__.py:917(get_tables_for_bind) + 6 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/selectable.py:2899(_froms) + 77 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/session.py:1339(_add_bind) + 14 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/compiler.py:1716(_label_select_column) + 4 0.000 0.000 0.007 0.002 :1356(find_spec) + 2 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/loading.py:337(_instance_processor) + + +-------------------------------------------------------------------------------- + +-------------------------------------------------------------------------------- +PATH: '/lots/' + 78032 function calls (74983 primitive calls) in 0.415 seconds + + Ordered by: internal time, call count + List reduced from 1209 to 30 due to restriction <30> + + ncalls tottime percall cumtime percall filename:lineno(function) + 58 0.225 0.004 0.227 0.004 {method 'execute' of 'psycopg2.extensions.cursor' objects} + 4 0.068 0.017 0.078 0.020 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/selectable.py:3607(_populate_column_collection) + 58 0.008 0.000 0.015 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/visitors.py:221(iterate) + 34 0.005 0.000 0.005 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/elements.py:697(__getattr__) + 1 0.005 0.005 0.005 0.005 {method 'rollback' of 'psycopg2.extensions.connection' objects} + 55 0.003 0.000 0.007 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/loading.py:337(_instance_processor) + 129 0.003 0.000 0.006 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/selectable.py:2899(_froms) + 55 0.002 0.000 0.009 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/query.py:3898(row_processor) + 58 0.002 0.000 0.002 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/flask_sqlalchemy/__init__.py:109(_calling_context) +2496/1771 0.002 0.000 0.243 0.000 {built-in method builtins.getattr} + 3395 0.002 0.000 0.002 0.000 {built-in method builtins.isinstance} + 58 0.001 0.000 0.242 0.004 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/base.py:1155(_execute_context) + 663 0.001 0.000 0.002 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/interfaces.py:512(_get_context_loader) + 58 0.001 0.000 0.004 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/default.py:622(_init_compiled) + 60 0.001 0.000 0.004 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/schema.py:976(__init__) + 269 0.001 0.000 0.002 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/base.py:38() + 52 0.001 0.000 0.237 0.005 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/strategies.py:730(_emit_lazyload) + 60 0.001 0.000 0.012 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/schema.py:1521(_make_proxy) + 92 0.001 0.000 0.015 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/loading.py:35(instances) + 58 0.001 0.000 0.253 0.004 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/base.py:1048(_execute_clauseelement) + 445/363 0.001 0.000 0.083 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py:836(__get__) + 4351 0.001 0.000 0.001 0.000 {method 'get' of 'dict' objects} + 37/25 0.001 0.000 0.251 0.010 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/marshmallow/marshalling.py:90(serialize) + 52 0.001 0.000 0.218 0.004 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/ext/baked.py:356(__iter__) + 128 0.001 0.000 0.002 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/compiler.py:826(visit_column) + 58 0.001 0.000 0.001 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/visitors.py:263(traverse_using) + 305 0.001 0.000 0.001 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/werkzeug/local.py:160(top) + 103/22 0.001 0.000 0.001 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py:245(get_cls_kwargs) + 893 0.001 0.000 0.001 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/result.py:643(_getter) + 1086 0.001 0.000 0.001 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/schema.py:1574(get_children) + + +-------------------------------------------------------------------------------- + +-------------------------------------------------------------------------------- +PATH: '/devices/' + 3735722 function calls (3415930 primitive calls) in 4.524 seconds + + Ordered by: internal time, call count + List reduced from 1551 to 30 due to restriction <30> + + ncalls tottime percall cumtime percall filename:lineno(function) + 1807 0.774 0.000 0.799 0.000 {method 'execute' of 'psycopg2.extensions.cursor' objects} + 3849 0.136 0.000 0.468 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/loading.py:337(_instance_processor) + 3947 0.086 0.000 0.302 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/visitors.py:221(iterate) + 227782 0.073 0.000 0.077 0.000 {built-in method builtins.isinstance} + 811/630 0.070 0.000 0.077 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py:909(__getattr__) + 4222 0.067 0.000 0.165 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/selectable.py:2899(_froms) +136047/99198 0.061 0.000 3.692 0.000 {built-in method builtins.getattr} + 45026 0.060 0.000 0.080 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/interfaces.py:512(_get_context_loader) +64724/61730 0.060 0.000 3.163 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/attributes.py:267(__get__) + 1298/30 0.057 0.000 4.153 0.138 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/marshmallow/marshalling.py:90(serialize) + 43993 0.045 0.000 0.238 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/interfaces.py:550(create_row_processor) + 66367 0.044 0.000 0.103 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/result.py:643(_getter) + 5417 0.042 0.000 0.129 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sortedcontainers/sortedset.py:108(__init__) + 1807 0.039 0.000 0.118 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/default.py:622(_init_compiled) +188239/60525 0.037 0.000 0.081 0.000 /usr/lib/python3.7/json/encoder.py:333(_iterencode_dict) + 14593 0.037 0.000 0.059 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/result.py:588(_key_fallback) + 1807 0.036 0.000 0.050 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/flask_sqlalchemy/__init__.py:109(_calling_context) + 1807 0.034 0.000 1.155 0.001 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/base.py:1155(_execute_context) + 22324 0.033 0.000 0.055 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/werkzeug/local.py:160(top) + 12519 0.030 0.000 0.083 0.000 {built-in method builtins.sorted} +19326/1469 0.030 0.000 4.133 0.003 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/marshmallow/fields.py:229(serialize) + 19326 0.030 0.000 3.691 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/marshmallow/utils.py:338(_get_value_for_key) + 3947 0.029 0.000 0.039 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/visitors.py:263(traverse_using) + 9085 0.029 0.000 0.068 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/base.py:38() + 66367 0.027 0.000 0.130 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/result.py:724(_getter) +4669/4549 0.026 0.000 0.840 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/loading.py:35(instances) + 5417 0.026 0.000 0.065 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sortedcontainers/sortedlist.py:320(update) + 148287 0.026 0.000 0.026 0.000 {method 'get' of 'dict' objects} + 13774 0.025 0.000 0.048 0.000 /home/cayo/ribaguifi/ereuse/dhub/ereuse_devicehub/resources/action/models.py:240(__lt__) + 5532/300 0.024 0.000 3.586 0.012 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/teal/marshmallow.py:212(serialize) + + +-------------------------------------------------------------------------------- + diff --git a/benchmarks/user_dhub_old_version.txt b/benchmarks/user_dhub_old_version.txt new file mode 100644 index 00000000..0217a693 --- /dev/null +++ b/benchmarks/user_dhub_old_version.txt @@ -0,0 +1,257 @@ + * Serving Flask app "ereuse_devicehub" (lazy loading) + * Environment: production + WARNING: Do not use the development server in a production environment. + Use a production WSGI server instead. + * Debug mode: on +-------------------------------------------------------------------------------- +PATH: '/versions/' + 6344 function calls (6063 primitive calls) in 1.183 seconds + + Ordered by: internal time, call count + List reduced from 849 to 30 due to restriction <30> + + ncalls tottime percall cumtime percall filename:lineno(function) + 9 1.164 0.129 1.164 0.129 {method 'acquire' of '_thread.RLock' objects} + 9 0.004 0.000 0.005 0.001 {method 'execute' of 'psycopg2.extensions.cursor' objects} + 3 0.003 0.001 0.003 0.001 {method 'rollback' of 'psycopg2.extensions.connection' objects} + 1 0.003 0.003 0.003 0.003 {built-in method psycopg2._psycopg._connect} + 12/3 0.000 0.000 0.000 0.000 /usr/lib/python3.7/sre_parse.py:469(_parse) + 65/2 0.000 0.000 0.000 0.000 {built-in method _abc._abc_subclasscheck} + 72/60 0.000 0.000 0.001 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py:836(__get__) + 433 0.000 0.000 0.000 0.000 {built-in method builtins.isinstance} + 77 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/session.py:1339(_add_bind) + 195/193 0.000 0.000 0.000 0.000 {built-in method builtins.getattr} + 22/3 0.000 0.000 0.000 0.000 /usr/lib/python3.7/sre_compile.py:71(_compile) + 11 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/base.py:37(_from_objects) + 5 0.000 -------------------------------------------------------------------------------- +PATH: '/lots/' + 821894 function calls (796177 primitive calls) in 1.204 seconds + + Ordered by: internal time, call count + List reduced from 1187 to 30 due to restriction <30> + + ncalls tottime percall cumtime percall filename:lineno(function) + 6149 0.080 0.000 0.081 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/event/registry.py:165(_key) + 66417 0.044 0.000 0.050 0.000 {built-in method builtins.isinstance} + 467 0.043 0.000 0.537 0.001 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/strategies.py:39(_register_attribute) + 6149 0.036 0.000 0.150 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/event/registry.py:67(_stored_in_collection) + 4269 0.032 0.000 0.052 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/elements.py:3030(__init__) +6150/6149 0.032 0.000 0.285 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/event/registry.py:193(listen) +15744/7854 0.031 0.000 0.065 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py:909(__getattr__) + 2797 0.028 0.000 0.054 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/visitors.py:221(iterate) +18395/10521 0.026 0.000 0.048 0.000 {built-in method builtins.hasattr} + 3990 0.025 0.000 0.135 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/attributes.py:1701(register_attribute_impl) + 2032 0.022 0.000 0.174 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/mapper.py:2501(visit_binary) + 3901 0.019 0.000 0.028 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/event/attr.py:330(__init__) + 16706 0.019 0.000 0.019 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/annotation.py:99(__hash__) + 3990 0.019 0.000 0.043 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/attributes.py:436(__init__) + 89 0.019 0.000 0.023 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/relationships.py:2405(visit_binary) + 4236 0.017 0.000 0.151 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/annotation.py:102(__eq__) + 6149 0.015 0.000 0.033 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/event/api.py:22(_event_key) + 3308 0.014 0.000 0.051 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/attributes.py:761(__init__) + 27512 0.014 0.000 0.019 0.000 {built-in method builtins.getattr} + 4206 0.014 0.000 0.024 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/elements.py:3050(__bool__) + 4269 0.014 0.000 0.092 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/default_comparator.py:40(_boolean_compare) + 78080 0.013 0.000 0.013 0.000 {method 'pop' of 'dict' objects} + 4269 0.012 0.000 0.104 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/type_api.py:63(operate) + 11500 0.012 0.000 0.012 0.000 {method 'popleft' of 'collections.deque' objects} + 3424 0.012 0.000 0.020 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py:881(expire_instance) + 6149 0.011 0.000 0.215 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/event/registry.py:237(base_listen) +8572/4269 0.011 0.000 0.135 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/operators.py:358(__eq__) + 6149 0.011 0.000 0.329 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/event/api.py:33(listen) + 10298 0.010 0.000 0.017 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/base.py:220(manager_of_class) + 7582 0.010 0.000 0.010 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/instrumentation.py:193(_attr_has_impl) + + +-------------------------------------------------------------------------------- + +-------------------------------------------------------------------------------- +PATH: '/devices/' + 2869 function calls (2841 primitive calls) in 1.116 seconds + + Ordered by: internal time, call count + List reduced from 664 to 30 due to restriction <30> + + 0.000 0.004 0.001 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/base.py:1155(_execute_context) + 2 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/werkzeug/routing.py:1443(match) + 103 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/werkzeug/routing.py:753(match) + 1 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/flask_sqlalchemy/__init__.py:917(get_tables_for_bind) + 37/28 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py:909(__getattr__) + 92 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/inspection.py:37(inspect) + 73 0.000 0.000 0.000 0.000 {built-in method builtins.hasattr} + 184 0.000 0.000 0.000 0.000 /usr/lib/python3.7/sre_parse.py:164(__getitem__) + 27 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/werkzeug/local.py:160(top) + 106 0.000 0.000 0.000 0.000 /usr/lib/python3.7/weakref.py:435(__contains__) + 9 0.000 0.000 0.001 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/compiler.py:1716(_label_select_column) + 10 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/compiler.py:826(visit_column) + 32/4 0.000 0.000 0.001 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/visitors.py:84(_compiler_dispatch) + 9 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/compiler.py:772(visit_label) + 5 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/selectable.py:2899(_froms) + 64 0.000 0.000 0.000 0.000 /usr/lib/python3.7/weakref.py:395(__getitem__) + 21/8 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py:245(get_cls_kwargs) + 9 0.000 0.000 0.000 0.000 {method 'cursor' of 'psycopg2.extensions.connection' objects} + + +-------------------------------------------------------------------------------- + + ncalls tottime percall cumtime percall filename:lineno(function) + 3 1.073 0.358 1.073 0.358 {method 'acquire' of '_thread.RLock' objects} + 1 0.025 0.025 0.025 0.025 {method 'rollback' of 'psycopg2.extensions.connection' objects} + 2 0.007 0.003 0.007 0.003 {method 'execute' of 'psycopg2.extensions.cursor' objects} + 1 0.004 0.004 0.004 0.004 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/event/attr.py:279(exec_once) + 1 0.003 0.003 0.003 0.003 {built-in method psycopg2._psycopg._connect} + 1 0.001 0.001 0.026 0.026 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/pool.py:716(_finalize_fairy) + 1 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/elements.py:1663(get_children) + 1 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/flask/app.py:2117(do_teardown_request) + 1 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/result.py:316() + 1 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/flask_sqlalchemy/__init__.py:917(get_tables_for_bind) + 77 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/session.py:1339(_add_bind) + 1 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/flask_sqlalchemy/__init__.py:925(get_binds) + 2 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/werkzeug/routing.py:1443(match) + 27 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/werkzeug/local.py:160(top) + 8 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/compiler.py:826(visit_column) + 72 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/werkzeug/routing.py:753(match) + 31 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/werkzeug/local.py:68(__getattr__) + 11 0.000 0.000 0.000 0.000 {method 'sub' of 're.Pattern' objects} + 154 0.000 0.000 0.000 0.000 {built-in method builtins.isinstance} + 83 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/inspection.py:37(inspect) + 2 0.000 0.000 0.007 0.004 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/base.py:1155(_execute_context) + 158 0.000 0.000 0.000 0.000 {method 'get' of 'dict' objects} + 3 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/selectable.py:2899(_froms) + 86 0.000 0.000 0.000 0.000 {built-in method builtins.getattr} + 1 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/session.py:639(__init__) + 7 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/compiler.py:1716(_label_select_column) + 2 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/default.py:622(_init_compiled) + 80 0.000 0.000 0.000 0.000 {method 'search' of 're.Pattern' objects} + 2 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/visitors.py:221(iterate) + 2 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/flask_sqlalchemy/__init__.py:109(_calling_context) + + +-------------------------------------------------------------------------------- + +-------------------------------------------------------------------------------- +PATH: '/versions/' + 9122 function calls (9001 primitive calls) in 0.204 seconds + + Ordered by: internal time, call count + List reduced from 999 to 30 due to restriction <30> + + ncalls tottime percall cumtime percall filename:lineno(function) + 8 0.090 0.011 0.090 0.011 {built-in method posix.stat} + 3 0.048 0.016 0.048 0.016 {method 'execute' of 'psycopg2.extensions.cursor' objects} + 1 0.017 0.017 0.017 0.017 {built-in method _socket.getaddrinfo} + 1 0.013 0.013 0.019 0.019 :914(get_data) + 2 0.008 0.004 0.008 0.004 {function socket.close at 0x7fd08d1efd40} + 1 0.006 0.006 0.006 0.006 {method 'read' of '_io.FileIO' objects} + 2 0.005 0.002 0.005 0.002 /usr/lib/python3.7/socket.py:139(__init__) + 1 0.004 0.004 0.004 0.004 {method 'rollback' of 'psycopg2.extensions.connection' objects} + 2 0.001 0.000 0.001 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/query.py:3898(row_processor) + 318 0.000 0.000 0.001 0.000 /usr/lib/python-exec/python3.7/../../../lib/python3.7/os.py:676(__getitem__) + 332 0.000 0.000 0.002 0.000 /usr/lib/python-exec/python3.7/../../../lib/python3.7/_collections_abc.py:742(__iter__) + 630/629 0.000 0.000 0.000 0.000 {method 'decode' of 'bytes' objects} + 312 0.000 0.000 0.000 0.000 /usr/lib/python-exec/python3.7/../../../lib/python3.7/os.py:699(__iter__) + 32/4 0.000 0.000 0.000 0.000 {built-in method _abc._abc_subclasscheck} + 727 0.000 0.000 0.000 0.000 {built-in method builtins.isinstance} + 2 0.000 0.000 0.002 0.001 /usr/lib/python3.7/urllib/request.py:2489(getproxies_environment) + 2 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/loading.py:337(_instance_processor) + 16 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/compiler.py:826(visit_column) + 620 0.000 0.000 0.000 0.000 /usr/lib/python-exec/python3.7/../../../lib/python3.7/os.py:758(decode) + 318 0.000 0.000 0.000 0.000 /usr/lib/python-exec/python3.7/../../../lib/python3.7/os.py:754(encode) + 6 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/selectable.py:2899(_froms) + 14 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/compiler.py:772(visit_label) + 14 0.000 0.000 0.001 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/compiler.py:1716(_label_select_column) + 342 0.000 0.000 0.000 0.000 {method 'encode' of 'str' objects} + 3 0.000 0.000 0.050 0.017 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/base.py:1155(_execute_context) + 51 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/werkzeug/local.py:160(top) + 39/3 0.000 0.000 0.001 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/visitors.py:84(_compiler_dispatch) + 77 0.000 0.000 0.000 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/session.py:1339(_add_bind) + 1 0.000 0.000 0.000 0.000 {built-in method marshal.loads} + 172 0.000 0.000 0.000 0.000 {built-in method builtins.getattr} + + +-------------------------------------------------------------------------------- + +-------------------------------------------------------------------------------- +PATH: '/devices/' + 3749097 function calls (3426518 primitive calls) in 8.391 seconds + + Ordered by: internal time, call count + List reduced from 1528 to 30 due to restriction <30> + + ncalls tottime percall cumtime percall filename:lineno(function) + 1829 4.330 0.002 4.362 0.002 {method 'execute' of 'psycopg2.extensions.cursor' objects} + 44950 0.147 0.000 0.164 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/interfaces.py:512(_get_context_loader) + 3871 0.143 0.000 0.568 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/loading.py:337(_instance_processor) + 4047 0.090 0.000 0.318 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/visitors.py:221(iterate) + 719 0.081 0.000 0.088 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/elements.py:890(__init__) + 228904 0.077 0.000 0.080 0.000 {built-in method builtins.isinstance} + 4285 0.069 0.000 0.172 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/selectable.py:2899(_froms) +189751/61029 0.067 0.000 0.120 0.000 /usr/lib/python3.7/json/encoder.py:333(_iterencode_dict) +137316/99651 0.063 0.000 7.521 0.000 {built-in method builtins.getattr} +64723/61729 0.060 0.000 6.845 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/attributes.py:267(__get__) + 1298/30 0.058 0.000 7.993 0.266 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/marshmallow/marshalling.py:90(serialize) + 44052 0.047 0.000 0.327 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/interfaces.py:550(create_row_processor) + 66094 0.046 0.000 0.108 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/result.py:643(_getter) + 5416 0.044 0.000 0.128 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sortedcontainers/sortedset.py:108(__init__) + 1829 0.040 0.000 0.056 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/flask_sqlalchemy/__init__.py:109(_calling_context) + 1829 0.039 0.000 4.747 0.003 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/base.py:1155(_execute_context) + 1829 0.038 0.000 0.126 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/default.py:622(_init_compiled) + 14593 0.038 0.000 0.061 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/result.py:588(_key_fallback) + 22870 0.034 0.000 0.056 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/werkzeug/local.py:160(top) + 4047 0.032 0.000 0.043 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/visitors.py:263(traverse_using) + 19422 0.031 0.000 7.233 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/marshmallow/utils.py:338(_get_value_for_key) + 9227 0.031 0.000 0.073 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/base.py:38() +19422/1469 0.030 0.000 7.972 0.005 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/marshmallow/fields.py:229(serialize) + 1829 0.030 0.000 0.032 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/compiler.py:632(construct_params) + 12540 0.030 0.000 0.091 0.000 {built-in method builtins.sorted} +4715/4595 0.028 0.000 1.076 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/loading.py:35(instances) + 13738 0.028 0.000 0.048 0.000 /home/cayo/ribaguifi/ereuse/dhub/ereuse_devicehub/resources/action/models.py:240(__lt__) + 3715 0.027 0.000 0.035 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/compiler.py:1497(_truncated_identifier) + 66094 0.027 0.000 0.134 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/result.py:724(_getter) + 1829 0.027 0.000 5.041 0.003 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/base.py:1048(_execute_clauseelement) + + +-------------------------------------------------------------------------------- + +-------------------------------------------------------------------------------- +PATH: '/lots/' + 22194313 function calls (19571472 primitive calls) in 28.238 seconds + + Ordered by: internal time, call count + List reduced from 1554 to 30 due to restriction <30> + + ncalls tottime percall cumtime percall filename:lineno(function) + 10276 7.129 0.001 7.271 0.001 {method 'execute' of 'psycopg2.extensions.cursor' objects} + 22077 0.874 0.000 2.719 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/loading.py:337(_instance_processor) + 23003 0.512 0.000 1.742 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/visitors.py:221(iterate) + 1317963 0.435 0.000 0.447 0.000 {built-in method builtins.isinstance} + 24077 0.390 0.000 0.949 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/selectable.py:2899(_froms) + 256711 0.358 0.000 0.408 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/interfaces.py:512(_get_context_loader) +414404/395611 0.352 0.000 20.872 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/attributes.py:267(__get__) +792239/576826 0.348 0.000 24.675 0.000 {built-in method builtins.getattr} + 7583/25 0.336 0.000 27.409 1.096 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/marshmallow/marshalling.py:90(serialize) +1478163/360759 0.278 0.000 0.600 0.000 /usr/lib/python3.7/json/encoder.py:333(_iterencode_dict) + 252403 0.260 0.000 1.325 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/interfaces.py:550(create_row_processor) + 376026 0.244 0.000 0.592 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/result.py:643(_getter) + 30982 0.241 0.000 0.749 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sortedcontainers/sortedset.py:108(__init__) + 10276 0.210 0.000 0.644 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/default.py:622(_init_compiled) + 83633 0.209 0.000 0.348 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/result.py:588(_key_fallback) + 10276 0.209 0.000 0.295 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/flask_sqlalchemy/__init__.py:109(_calling_context) + 10273 0.197 0.000 1.212 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/orm/query.py:3898(row_processor) + 10276 0.194 0.000 9.188 0.001 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/base.py:1155(_execute_context) + 133552 0.186 0.000 0.309 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/werkzeug/local.py:160(top) +113482/475 0.181 0.000 27.400 0.058 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/marshmallow/fields.py:229(serialize) + 23003 0.178 0.000 0.236 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/visitors.py:263(traverse_using) + 113482 0.177 0.000 23.755 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/marshmallow/utils.py:338(_get_value_for_key) + 71690 0.176 0.000 0.501 0.000 {built-in method builtins.sorted} + 51856 0.167 0.000 0.392 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/sql/base.py:38() + 91604 0.151 0.000 0.286 0.000 /home/cayo/ribaguifi/ereuse/dhub/ereuse_devicehub/resources/action/models.py:240(__lt__) +1007699/360723 0.151 0.000 0.546 0.000 /usr/lib/python3.7/json/encoder.py:277(_iterencode_list) + 376026 0.148 0.000 0.740 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sqlalchemy/engine/result.py:724(_getter) +33713/150 0.147 0.000 27.395 0.183 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/teal/marshmallow.py:212(serialize) + 30982 0.146 0.000 0.391 0.000 /home/cayo/ribaguifi/ereuse/dhub/env/lib/python3.7/site-packages/sortedcontainers/sortedlist.py:320(update) + 850451 0.143 0.000 0.143 0.000 {method 'get' of 'dict' objects} + + +-------------------------------------------------------------------------------- +