Tests / apps/api/tests.py
IngestStartEndpointTest::test_ingest_start_progress_end
First seen 2 years, 10 months ago in 9ff0a7e
CI
github-actions:test
12 runs
Average
279 ms
median 296 ms
max 368 ms
max 368 ms
Phases
Setup 0.85 ms
Call 278 ms
Teardown 0.26 ms
Categories
Database 145 ms
App code 1.00 ms
Factories 0.11 ms
Other (DB schema, Libraries, Imports, pytest, ...) 133 ms
133 database queries per run
Needs 127 KB of memory (max 464 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 16 hours ago ·
open run
setup0.82 ms0.3%
call272 ms99.6%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()94 ms34.3%
TransactionTestCase._fixture_teardowndjango/test/testcases.py:127594 ms34.3%
call_commanddjango/core/management/__init__.py:19594 ms34.3%
BaseCommand.executedjango/core/management/base.py:46094 ms34.3%
Command.handledjango/core/management/commands/flush.py:9250 ms18.5%
emit_post_migrate_signaldjango/core/management/sql.py:5250 ms18.5%
Signal.senddjango/dispatch/dispatcher.py:20950 ms18.5%
create_permissionsdjango/contrib/auth/management/__init__.py:10723 ms8.6%
QuerySet.bulk_createdjango/db/models/query.py:83320 ms7.3%
QuerySet._batched_insertdjango/db/models/query.py:195620 ms7.3%
QuerySet._insertdjango/db/models/query.py:191820 ms7.3%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:192520 ms7.3%
CursorWrapper.executedjango/db/backends/utils.py:7920 ms7.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9220 ms7.3%
CursorWrapper._executedjango/db/backends/utils.py:10520 ms7.3%
Cursor.executepsycopg/cursor.py:11320 ms7.3%
Connection.waitpsycopg/connection.py:49520 ms7.3%
BaseCursor._execute_genpsycopg/_cursor_base.py:20615 ms5.6%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:28615 ms5.6%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:7815 ms5.6%
1 smaller frames hidden
QuerySet.bulk_createdjango/db/models/query.py:8082 ms0.9%
QuerySet._prepare_for_bulk_createdjango/db/models/query.py:6922 ms0.9%
1 smaller frames hidden
create_permissionsdjango/contrib/auth/management/__init__.py:619 ms3.4%
create_contenttypesdjango/contrib/contenttypes/management/__init__.py:1226 ms2.1%
QuerySet.__iter__django/db/models/query.py:3906 ms2.1%
QuerySet._fetch_alldjango/db/models/query.py:20006 ms2.1%
FlatValuesListIterable.__iter__django/db/models/query.py:2776 ms2.1%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15736 ms2.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16246 ms2.1%
CursorWrapper.executedjango/db/backends/utils.py:796 ms2.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:926 ms2.1%
CursorWrapper._executedjango/db/backends/utils.py:1056 ms2.1%
Cursor.executepsycopg/cursor.py:1136 ms2.1%
Connection.waitpsycopg/connection.py:4956 ms2.1%
create_contenttypesdjango/contrib/contenttypes/management/__init__.py:1324 ms1.3%
QuerySet.bulk_createdjango/db/models/query.py:8334 ms1.3%
QuerySet._batched_insertdjango/db/models/query.py:19564 ms1.3%
QuerySet._insertdjango/db/models/query.py:19184 ms1.3%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19254 ms1.3%
CursorWrapper.executedjango/db/backends/utils.py:794 ms1.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:924 ms1.3%
CursorWrapper._executedjango/db/backends/utils.py:1054 ms1.3%
Cursor.executepsycopg/cursor.py:1134 ms1.3%
Connection.waitpsycopg/connection.py:4954 ms1.3%
create_permissionsdjango/contrib/auth/management/__init__.py:877 ms2.6%
QuerySet.__iter__django/db/models/query.py:3907 ms2.6%
QuerySet._fetch_alldjango/db/models/query.py:20007 ms2.6%
ValuesListIterable.__iter__django/db/models/query.py:2387 ms2.6%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15737 ms2.6%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16244 ms1.3%
CursorWrapper.executedjango/db/backends/utils.py:794 ms1.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:924 ms1.3%
CursorWrapper._executedjango/db/backends/utils.py:1054 ms1.3%
Cursor.executepsycopg/cursor.py:1134 ms1.3%
Connection.waitpsycopg/connection.py:4954 ms1.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16112 ms0.9%
1 smaller frames hidden
create_permissionsdjango/contrib/auth/management/__init__.py:806 ms2.1%
ContentTypeManager.get_for_modelsdjango/contrib/contenttypes/models.py:915 ms1.7%
QuerySet.__iter__django/db/models/query.py:3905 ms1.7%
QuerySet._fetch_alldjango/db/models/query.py:20005 ms1.7%
ModelIterable.__iter__django/db/models/query.py:955 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16244 ms1.3%
CursorWrapper.executedjango/db/backends/utils.py:794 ms1.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:924 ms1.3%
CursorWrapper._executedjango/db/backends/utils.py:1054 ms1.3%
Cursor.executepsycopg/cursor.py:1134 ms1.3%
Connection.waitpsycopg/connection.py:4954 ms1.3%
1 smaller frames hidden
1 smaller frames hidden
create_contenttypesdjango/contrib/contenttypes/management/__init__.py:1222 ms0.9%
QuerySet.__iter__django/db/models/query.py:3902 ms0.9%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms0.9%
FlatValuesListIterable.__iter__django/db/models/query.py:2772 ms0.9%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15732 ms0.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms0.9%
CursorWrapper.executedjango/db/backends/utils.py:792 ms0.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms0.9%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms0.9%
Cursor.executepsycopg/cursor.py:1132 ms0.9%
Connection.waitpsycopg/connection.py:4952 ms0.9%
1 smaller frames hidden
Command.handledjango/core/management/commands/flush.py:7439 ms14.2%
BaseDatabaseOperations.execute_sql_flushdjango/db/backends/base/operations.py:46832 ms11.6%
CursorWrapper.executedjango/db/backends/utils.py:7932 ms11.6%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9232 ms11.6%
CursorWrapper._executedjango/db/backends/utils.py:10332 ms11.6%
Cursor.executepsycopg/cursor.py:11332 ms11.6%
Connection.waitpsycopg/connection.py:49532 ms11.6%
BaseDatabaseOperations.execute_sql_flushdjango/db/backends/base/operations.py:4627 ms2.6%
Atomic.__exit__django/db/transaction.py:2637 ms2.6%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:267 ms2.6%
BaseDatabaseWrapper.commitdjango/db/backends/base/base.py:3277 ms2.6%
BaseDatabaseWrapper._commitdjango/db/backends/base/base.py:3037 ms2.6%
Connection.commitpsycopg/connection.py:3097 ms2.6%
Connection.waitpsycopg/connection.py:4957 ms2.6%
Command.handledjango/core/management/commands/flush.py:524 ms1.3%
sql_flushdjango/core/management/sql.py:114 ms1.3%
BaseDatabaseIntrospection.django_table_namesdjango/db/backends/base/introspection.py:1134 ms1.3%
BaseDatabaseIntrospection.table_namesdjango/db/backends/base/introspection.py:604 ms1.3%
BaseDatabaseIntrospection.table_names.<locals>.get_namesdjango/db/backends/base/introspection.py:544 ms1.3%
DatabaseIntrospection.get_table_listdjango/db/backends/postgresql/introspection.py:584 ms1.3%
CursorWrapper.executedjango/db/backends/utils.py:794 ms1.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:924 ms1.3%
CursorWrapper._executedjango/db/backends/utils.py:1034 ms1.3%
Cursor.executepsycopg/cursor.py:1134 ms1.3%
Connection.waitpsycopg/connection.py:4954 ms1.3%
1 smaller frames hidden
IngestStartEndpointTest.test_ingest_start_progress_endapps/api/tests.py:210 self.join_workers()60 ms21.9%
IngestStartEndpointTest.join_workersapps/api/tests.py:76 drain(current_app(), raise_on_failure=True)60 ms21.9%
drainpotatoq/testing.py:7357 ms21.0%
executepotatoq/worker/executor.py:28857 ms21.0%
_executepotatoq/worker/executor.py:36857 ms21.0%
Task.__call__potatoq/task.py:19257 ms21.0%
Atomic.__enter__django/db/transaction.py:19827 ms9.9%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:45427 ms9.9%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:30327 ms9.9%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2627 ms9.9%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:27927 ms9.9%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2627 ms9.9%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:25627 ms9.9%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2627 ms9.9%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:33327 ms9.9%
Connection.connectpsycopg/connection.py:10920 ms7.3%
wait_connpsycopg/waiting.py:14511 ms3.9%
BaseConnection._connect_genpsycopg/_connection_base.py:43911 ms3.9%
wait_connpsycopg/waiting.py:1416 ms2.1%
EpollSelector.select<stdlib>/selectors.py:4526 ms2.1%
wait_connpsycopg/waiting.py:1362 ms0.9%
BaseConnection._connect_genpsycopg/_connection_base.py:4392 ms0.9%
1 smaller frames hidden
Connection.connectpsycopg/connection.py:1007 ms2.6%
conninfo_attemptspsycopg/_conninfo_attempts.py:457 ms2.6%
_resolve_hostnamespsycopg/_conninfo_attempts.py:1027 ms2.6%
getaddrinfo<stdlib>/socket.py:9987 ms2.6%
warm_reportsapps/api/tasks.py:266 flaky_report(Project.objects.get(pk=project_id), DEFAULT_DAYS)19 ms6.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:879 ms3.4%
QuerySet.getdjango/db/models/query.py:6359 ms3.4%
QuerySet.__len__django/db/models/query.py:3729 ms3.4%
QuerySet._fetch_alldjango/db/models/query.py:20009 ms3.4%
ModelIterable.__iter__django/db/models/query.py:959 ms3.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16228 ms3.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:268 ms3.0%
BaseDatabaseWrapper.cursordjango/db/backends/base/base.py:3208 ms3.0%
BaseDatabaseWrapper._cursordjango/db/backends/base/base.py:2968 ms3.0%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:3038 ms3.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:268 ms3.0%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:2798 ms3.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:268 ms3.0%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2567 ms2.6%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:267 ms2.6%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:3337 ms2.6%
Connection.connectpsycopg/connection.py:1097 ms2.6%
wait_connpsycopg/waiting.py:1455 ms1.7%
BaseConnection._connect_genpsycopg/_connection_base.py:4395 ms1.7%
wait_connpsycopg/waiting.py:1412 ms0.9%
EpollSelector.select<stdlib>/selectors.py:4522 ms0.9%
1 smaller frames hidden
1 smaller frames hidden
flaky_reportapps/projects/flakiness.py:2537 ms2.6%
compute_flaky_reportapps/projects/flakiness.py:2685 ms1.7%
compute_flaky_reportapps/projects/flakiness.py:2722 ms0.9%
flaky_reportapps/projects/flakiness.py:2502 ms0.9%
process_ingest_endapps/api/tasks.py:210 session = Session.objects.get(project=ingest.project, ingest_id=parent_ingest_id)2 ms0.9%
8 smaller frames hidden
2 smaller frames hidden
IngestStartEndpointTest.test_ingest_start_progress_endapps/api/tests.py:19153 ms19.3%
IngestStartEndpointTest.ingest_startapps/api/tests.py:98 return self.client.post(53 ms19.3%
Client.postdjango/test/client.py:115353 ms19.3%
RequestFactory.postdjango/test/client.py:49953 ms19.3%
RequestFactory.genericdjango/test/client.py:67153 ms19.3%
Client.requestdjango/test/client.py:108253 ms19.3%
ClientHandler.__call__django/test/client.py:18643 ms15.9%
BaseHandler.get_responsedjango/core/handlers/base.py:14143 ms15.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5543 ms15.9%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:13043 ms15.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5543 ms15.9%
MiddlewareMixin.__call__django/utils/deprecation.py:30943 ms15.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5543 ms15.9%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12343 ms15.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5543 ms15.9%
MiddlewareMixin.__call__django/utils/deprecation.py:30943 ms15.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5543 ms15.9%
MiddlewareMixin.__call__django/utils/deprecation.py:30943 ms15.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5543 ms15.9%
MiddlewareMixin.__call__django/utils/deprecation.py:30943 ms15.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5543 ms15.9%
MiddlewareMixin.__call__django/utils/deprecation.py:30943 ms15.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5543 ms15.9%
MiddlewareMixin.__call__django/utils/deprecation.py:30943 ms15.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5543 ms15.9%
MiddlewareMixin.__call__django/utils/deprecation.py:30943 ms15.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5543 ms15.9%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:3443 ms15.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5543 ms15.9%
BaseHandler._get_responsedjango/core/handlers/base.py:19843 ms15.9%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:6543 ms15.9%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:3743 ms15.9%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:6443 ms15.9%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:73 touch_token(request.headers.get("Authorization"))23 ms8.6%
touch_tokenapps/api/urls.py:59 SecretTokens.objects.filter(pk__in=list(stale)).update(date_last_used=now)21 ms7.7%
QuerySet.updatedjango/db/models/query.py:130013 ms4.7%
SQLUpdateCompiler.execute_sqldjango/db/models/sql/compiler.py:211113 ms4.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162412 ms4.3%
CursorWrapper.executedjango/db/backends/utils.py:7912 ms4.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9212 ms4.3%
CursorWrapper._executedjango/db/backends/utils.py:10512 ms4.3%
Cursor.executepsycopg/cursor.py:11312 ms4.3%
Connection.waitpsycopg/connection.py:49512 ms4.3%
BaseCursor._execute_genpsycopg/_cursor_base.py:20612 ms4.3%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2869 ms3.4%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:789 ms3.4%
2 smaller frames hidden
1 smaller frames hidden
QuerySet.__iter__django/db/models/query.py:3907 ms2.6%
QuerySet._fetch_alldjango/db/models/query.py:20007 ms2.6%
FlatValuesListIterable.__iter__django/db/models/query.py:2777 ms2.6%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15737 ms2.6%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16247 ms2.6%
CursorWrapper.executedjango/db/backends/utils.py:797 ms2.6%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:927 ms2.6%
CursorWrapper._executedjango/db/backends/utils.py:1057 ms2.6%
Cursor.executepsycopg/cursor.py:1137 ms2.6%
Connection.waitpsycopg/connection.py:4957 ms2.6%
BaseCursor._execute_genpsycopg/_cursor_base.py:2065 ms1.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2864 ms1.3%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:784 ms1.3%
1 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
Atomic.__exit__django/db/transaction.py:2632 ms0.9%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms0.9%
BaseDatabaseWrapper.commitdjango/db/backends/base/base.py:3272 ms0.9%
BaseDatabaseWrapper._commitdjango/db/backends/base/base.py:3032 ms0.9%
Connection.commitpsycopg/connection.py:3092 ms0.9%
Connection.waitpsycopg/connection.py:4952 ms0.9%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:7520 ms7.3%
ingest_startapps/api/urls.py:100 process_ingest_start(ingest.id)9 ms3.4%
_SharedTaskProxy.__call__potatoq/app.py:7639 ms3.4%
Task.__call__potatoq/task.py:1899 ms3.4%
process_ingest_startapps/api/tasks.py:79 ingest.project,2 ms0.9%
process_ingest_startapps/api/tasks.py:772 ms0.9%
4 smaller frames hidden
ingest_startapps/api/urls.py:90 ingest = Ingest.objects.create(project=project, source="ingest_start", data=json.loads(request.body))8 ms3.0%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:878 ms3.0%
QuerySet.createdjango/db/models/query.py:6676 ms2.1%
Model.savedjango/db/models/base.py:8744 ms1.3%
Model.save_basedjango/db/models/base.py:9664 ms1.3%
Model._save_tabledjango/db/models/base.py:11674 ms1.3%
Model._do_insertdjango/db/models/base.py:12184 ms1.3%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:874 ms1.3%
QuerySet._insertdjango/db/models/query.py:19184 ms1.3%
2 smaller frames hidden
QuerySet.createdjango/db/models/query.py:6692 ms0.9%
Model.savedjango/db/models/base.py:8742 ms0.9%
Model.save_basedjango/db/models/base.py:9662 ms0.9%
Model._save_tabledjango/db/models/base.py:11672 ms0.9%
Model._do_insertdjango/db/models/base.py:12182 ms0.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms0.9%
QuerySet._insertdjango/db/models/query.py:19182 ms0.9%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19252 ms0.9%
CursorWrapper.executedjango/db/backends/utils.py:792 ms0.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms0.9%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms0.9%
Cursor.executepsycopg/cursor.py:1132 ms0.9%
Connection.waitpsycopg/connection.py:4952 ms0.9%
2 smaller frames hidden
ClientHandler.__call__django/test/client.py:1738 ms3.0%
BaseHandler.load_middlewaredjango/core/handlers/base.py:628 ms3.0%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:1048 ms3.0%
WhiteNoise.add_fileswhitenoise/base.py:1088 ms3.0%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1207 ms2.6%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1316 ms2.1%
WhiteNoise.get_static_filewhitenoise/base.py:2034 ms1.3%
WhiteNoise.add_cache_headerswhitenoise/base.py:2244 ms1.3%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1764 ms1.3%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1974 ms1.3%
URLMixin.urldebug_toolbar/panels/staticfiles.py:204 ms1.3%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2052 ms0.9%
2 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
IngestStartEndpointTest.test_ingest_start_progress_endapps/api/tests.py:20522 ms8.2%
IngestStartEndpointTest.join_workersapps/api/tests.py:76 drain(current_app(), raise_on_failure=True)22 ms8.2%
drainpotatoq/testing.py:7322 ms8.2%
executepotatoq/worker/executor.py:28822 ms8.2%
_executepotatoq/worker/executor.py:36822 ms8.2%
Task.__call__potatoq/task.py:19222 ms8.2%
Atomic.__enter__django/db/transaction.py:1989 ms3.4%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:4549 ms3.4%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:3039 ms3.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms3.4%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:2799 ms3.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms3.4%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2569 ms3.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms3.4%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:3339 ms3.4%
Connection.connectpsycopg/connection.py:1099 ms3.4%
wait_connpsycopg/waiting.py:1414 ms1.3%
EpollSelector.select<stdlib>/selectors.py:4524 ms1.3%
wait_connpsycopg/waiting.py:1454 ms1.3%
BaseConnection._connect_genpsycopg/_connection_base.py:4394 ms1.3%
wait_connpsycopg/waiting.py:1362 ms0.9%
BaseConnection._connect_genpsycopg/_connection_base.py:4392 ms0.9%
process_ingest_progressapps/api/tasks.py:1215 ms1.7%
TestManager.upsertapps/projects/models.py:2292 ms0.9%
2 smaller frames hidden
process_ingest_progressapps/api/tasks.py:165 TestRun.objects.bulk_create(2 ms0.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms0.9%
QuerySet.bulk_createdjango/db/models/query.py:8332 ms0.9%
QuerySet._batched_insertdjango/db/models/query.py:19562 ms0.9%
QuerySet._insertdjango/db/models/query.py:19182 ms0.9%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19252 ms0.9%
CursorWrapper.executedjango/db/backends/utils.py:792 ms0.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms0.9%
process_ingest_progressapps/api/tasks.py:1852 ms0.9%
3 smaller frames hidden
IngestStartEndpointTest.test_ingest_start_progress_endapps/api/tests.py:20715 ms5.6%
IngestStartEndpointTest.ingest_endapps/api/tests.py:11415 ms5.6%
Client.postdjango/test/client.py:115315 ms5.6%
RequestFactory.postdjango/test/client.py:49915 ms5.6%
RequestFactory.genericdjango/test/client.py:67115 ms5.6%
Client.requestdjango/test/client.py:108215 ms5.6%
ClientHandler.__call__django/test/client.py:18615 ms5.6%
BaseHandler.get_responsedjango/core/handlers/base.py:14115 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.6%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:13015 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.6%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12315 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.6%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:3415 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.6%
BaseHandler._get_responsedjango/core/handlers/base.py:19815 ms5.6%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:6515 ms5.6%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:3715 ms5.6%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:6415 ms5.6%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:72 project = get_object_or_404(Project, secrettokens__token=request.headers.get("Authorization"))12 ms4.3%
get_object_or_404django/shortcuts.py:9012 ms4.3%
QuerySet.getdjango/db/models/query.py:63512 ms4.3%
QuerySet.__len__django/db/models/query.py:37212 ms4.3%
QuerySet._fetch_alldjango/db/models/query.py:200012 ms4.3%
ModelIterable.__iter__django/db/models/query.py:9512 ms4.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16229 ms3.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms3.4%
BaseDatabaseWrapper.cursordjango/db/backends/base/base.py:3209 ms3.4%
BaseDatabaseWrapper._cursordjango/db/backends/base/base.py:2969 ms3.4%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:3039 ms3.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms3.4%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:2799 ms3.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms3.4%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2569 ms3.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms3.4%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:3339 ms3.4%
Connection.connectpsycopg/connection.py:1099 ms3.4%
wait_connpsycopg/waiting.py:1455 ms1.7%
BaseConnection._connect_genpsycopg/_connection_base.py:4395 ms1.7%
wait_connpsycopg/waiting.py:1414 ms1.3%
EpollSelector.select<stdlib>/selectors.py:4522 ms0.9%
1 smaller frames hidden
1 smaller frames hidden
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms0.9%
CursorWrapper.executedjango/db/backends/utils.py:792 ms0.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms0.9%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms0.9%
Cursor.executepsycopg/cursor.py:1132 ms0.9%
Connection.waitpsycopg/connection.py:4952 ms0.9%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:752 ms0.9%
ingest_endapps/api/urls.py:120 ingest = Ingest.objects.create(project=project, source="ingest_end", data=json.loads(request.body))2 ms0.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms0.9%
QuerySet.createdjango/db/models/query.py:6692 ms0.9%
Model.savedjango/db/models/base.py:8742 ms0.9%
Model.save_basedjango/db/models/base.py:9662 ms0.9%
1 smaller frames hidden
IngestStartEndpointTest.setUpapps/api/tests.py:73 self.project = baker.make("projects.Project", secrettokens_set__token=self.secret_token)14 ms5.2%
makemodel_bakery/baker.py:14714 ms5.2%
Baker.makemodel_bakery/baker.py:40614 ms5.2%
Baker._makemodel_bakery/baker.py:47111 ms3.9%
Baker.generate_valuemodel_bakery/baker.py:80011 ms3.9%
gen_relatedmodel_bakery/random_gen.py:27411 ms3.9%
makemodel_bakery/baker.py:14711 ms3.9%
Baker.makemodel_bakery/baker.py:40611 ms3.9%
Baker._makemodel_bakery/baker.py:48211 ms3.9%
Baker.instancemodel_bakery/baker.py:53511 ms3.9%
Model.savedjango/db/models/base.py:87411 ms3.9%
Model.save_basedjango/db/models/base.py:96611 ms3.9%
Model._save_tabledjango/db/models/base.py:116711 ms3.9%
Model._do_insertdjango/db/models/base.py:121811 ms3.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:8711 ms3.9%
QuerySet._insertdjango/db/models/query.py:191811 ms3.9%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19239 ms3.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms3.4%
BaseDatabaseWrapper.cursordjango/db/backends/base/base.py:3209 ms3.4%
BaseDatabaseWrapper._cursordjango/db/backends/base/base.py:2969 ms3.4%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:3039 ms3.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms3.4%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:2799 ms3.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms3.4%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2568 ms3.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:268 ms3.0%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:3338 ms3.0%
Connection.connectpsycopg/connection.py:1098 ms3.0%
wait_connpsycopg/waiting.py:1455 ms1.7%
BaseConnection._connect_genpsycopg/_connection_base.py:4395 ms1.7%
wait_connpsycopg/waiting.py:1414 ms1.3%
EpollSelector.select<stdlib>/selectors.py:4524 ms1.3%
1 smaller frames hidden
1 smaller frames hidden
Baker._makemodel_bakery/baker.py:4822 ms0.9%
Baker.instancemodel_bakery/baker.py:5352 ms0.9%
Model.savedjango/db/models/base.py:8742 ms0.9%
Model.save_basedjango/db/models/base.py:9662 ms0.9%
Model._save_tabledjango/db/models/base.py:11672 ms0.9%
Model._do_insertdjango/db/models/base.py:12182 ms0.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms0.9%
QuerySet._insertdjango/db/models/query.py:19182 ms0.9%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19252 ms0.9%
CursorWrapper.executedjango/db/backends/utils.py:792 ms0.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms0.9%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms0.9%
Cursor.executepsycopg/cursor.py:1132 ms0.9%
Connection.waitpsycopg/connection.py:4952 ms0.9%
1 smaller frames hidden
IngestStartEndpointTest.test_ingest_start_progress_endapps/api/tests.py:212 run = Run.objects.filter(project=self.project).get()9 ms3.4%
QuerySet.getdjango/db/models/query.py:6359 ms3.4%
QuerySet.__len__django/db/models/query.py:3729 ms3.4%
QuerySet._fetch_alldjango/db/models/query.py:20009 ms3.4%
ModelIterable.__iter__django/db/models/query.py:959 ms3.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16228 ms3.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:268 ms3.0%
BaseDatabaseWrapper.cursordjango/db/backends/base/base.py:3208 ms3.0%
BaseDatabaseWrapper._cursordjango/db/backends/base/base.py:2968 ms3.0%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:3038 ms3.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:268 ms3.0%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:2798 ms3.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:268 ms3.0%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2567 ms2.6%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:267 ms2.6%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:3337 ms2.6%
Connection.connectpsycopg/connection.py:1097 ms2.6%
wait_connpsycopg/waiting.py:1414 ms1.3%
EpollSelector.select<stdlib>/selectors.py:4524 ms1.3%
wait_connpsycopg/waiting.py:1454 ms1.3%
BaseConnection._connect_genpsycopg/_connection_base.py:4394 ms1.3%
1 smaller frames hidden
1 smaller frames hidden
IngestStartEndpointTest.test_ingest_start_progress_endapps/api/tests.py:1974 ms1.3%
IngestStartEndpointTest.ingest_progressapps/api/tests.py:1064 ms1.3%
Client.postdjango/test/client.py:11534 ms1.3%
RequestFactory.postdjango/test/client.py:4994 ms1.3%
RequestFactory.genericdjango/test/client.py:6714 ms1.3%
Client.requestdjango/test/client.py:10824 ms1.3%
ClientHandler.__call__django/test/client.py:1864 ms1.3%
BaseHandler.get_responsedjango/core/handlers/base.py:1414 ms1.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms1.3%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1304 ms1.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms1.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms1.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms1.3%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1234 ms1.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms1.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms1.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms1.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms1.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms1.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms1.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms1.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms1.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms1.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms1.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms1.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms1.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms1.3%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:344 ms1.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms1.3%
BaseHandler._get_responsedjango/core/handlers/base.py:1984 ms1.3%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:654 ms1.3%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:374 ms1.3%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:644 ms1.3%
1 smaller frames hidden
Estimated from 233 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
apps/api/tests.py:76
drain(current_app(), raise_on_failure=True)
IngestStartEndpointTest.join_workers
· Database
|
40 ms |
|
apps/api/urls.py:59
SecretTokens.objects.filter(pk__in=list(stale)).update(date_last_used=now)
touch_token
· Database
|
23 ms |
|
apps/api/tests.py:73
self.project = baker.make("projects.Project", secrettokens_set__token=self.secret_token)
IngestStartEndpointTest.setUp
· Database
|
14 ms |
|
apps/api/urls.py:72
project = get_object_or_404(Project, secrettokens__token=request.headers.get("Authorization"))
api_request.<locals>.decorator.<locals>.wrapped_view
· Database
|
13 ms |
|
apps/api/tests.py:98
return self.client.post(
IngestStartEndpointTest.ingest_start
· Libraries
|
9 ms |
|
apps/api/tasks.py:266
flaky_report(Project.objects.get(pk=project_id), DEFAULT_DAYS)
warm_reports
· Database
|
9 ms |
|
apps/api/tests.py:212
run = Run.objects.filter(project=self.project).get()
IngestStartEndpointTest.test_ingest_start_progress_end
· Database
|
9 ms |
|
apps/api/urls.py:90
ingest = Ingest.objects.create(project=project, source="ingest_start", data=json.loads(request.body))
ingest_start
· Database
|
8 ms |
|
apps/api/urls.py:73
touch_token(request.headers.get("Authorization"))
api_request.<locals>.decorator.<locals>.wrapped_view
· Database
|
2 ms |
|
apps/api/tasks.py:79
ingest.project,
process_ingest_start
· Database
|
2 ms |
Fixtures
Exact setup time| _dj_autoclear_mailbox function | 0.05 ms |
| _django_set_urlconf function | 0.05 ms |
| _template_string_if_invalid_marker function | 0.04 ms |
| _django_db_marker function | 0.03 ms |
| _live_server_helper function | 0.03 ms |
| _django_clear_site_cache function | 0.02 ms |
| monkeypatch function | 0.02 ms |
Database
133 queries · 100 ms
Repeated queries are usually N+1 lookups: fetch them once with select_related / prefetch_related (or selectinload).
20×
SELECT "django_content_type"."model" AS "model" FROM "django_content_type" WHERE "django_content_type"."app_label" = %s
10×
SELECT "django_content_type"."id", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."app_label" = %s AND "django_content_type"."model" IN (…))
10×
SELECT "auth_permission"."content_type_id" AS "content_type", "auth_permission"."codename" AS "codename" FROM "auth_permission" INNER JOIN "django_content_type" ON ("auth_permission"."content_type_id" = "django_content_type"."id") WHERE "auth_permission"."content_type_id" IN (…) ORDER BY "django_co…
10×
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") SELECT * FROM UNNEST((%s)::varchar(?)[], (%s)::integer[], (%s)::varchar(?)[]) RETURNING "auth_permission"."id"
8×
SELECT "projects_project"."id", "projects_project"."organization_id", "projects_project"."name", "projects_project"."slug", "projects_project"."public", "projects_project"."description", "projects_project"."date_created", "projects_project"."date_updated", "projects_project"."created_by_id" FROM "p…
Biggest pieces of work
|
call test body
apps/api/tests.py:210
|
164 ms |
|
call _post_teardown
django/test/testcases.py:1240
|
94 ms |
|
call setUp
apps/api/tests.py:73
|
14 ms |
|
setup __init__
__init__:-1
|
0.82 ms |
Reliability
12 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 12 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 16 hours ago | CI github-actions:test | passed | 273 ms | Profile |
| 1 week, 5 days ago | CI github-actions:test | passed | 170 ms | Profile |
| 2 weeks, 1 day ago | CI github-actions:test | passed | 300 ms | Profile |
| 2 weeks, 1 day ago | CI github-actions:test | passed | 239 ms | Profile |
| 2 weeks, 1 day ago | CI github-actions:test | passed | 326 ms | Profile |
| 2 weeks, 2 days ago | CI github-actions:test | passed | 202 ms | Profile |
| 2 weeks, 4 days ago | CI github-actions:test | passed | 368 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 296 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 323 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 354 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 205 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 297 ms | Profile |