Tests / apps/api/tests.py
IngestStartEndpointTest::test_ingest_end_after_progress
First seen 2 years, 9 months ago in 9ff0a7e
CI
github-actions:test
5 runs
Average
311 ms
median 304 ms
max 468 ms
max 468 ms
Phases
Setup 0.99 ms
Call 310 ms
Teardown 0.28 ms
Categories
Database 141 ms
Factories 1 ms
App code 0.76 ms
Other (DB schema, Libraries, Imports, Unsampled, ...) 169 ms
133 database queries per run
Needs 598 KB of memory (max 752 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 22 minutes ago ·
open run
setup1 ms0.5%
call294 ms99.4%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()115 ms38.8%
TransactionTestCase._fixture_teardowndjango/test/testcases.py:1275115 ms38.8%
call_commanddjango/core/management/__init__.py:195115 ms38.8%
BaseCommand.executedjango/core/management/base.py:460115 ms38.8%
Command.handledjango/core/management/commands/flush.py:7461 ms20.5%
BaseDatabaseOperations.execute_sql_flushdjango/db/backends/base/operations.py:46848 ms16.1%
CursorWrapper.executedjango/db/backends/utils.py:7948 ms16.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9248 ms16.1%
CursorWrapper._executedjango/db/backends/utils.py:10348 ms16.1%
Cursor.executepsycopg/cursor.py:11348 ms16.1%
Connection.waitpsycopg/connection.py:49548 ms16.1%
BaseDatabaseOperations.execute_sql_flushdjango/db/backends/base/operations.py:46213 ms4.4%
Atomic.__exit__django/db/transaction.py:26313 ms4.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2613 ms4.4%
BaseDatabaseWrapper.commitdjango/db/backends/base/base.py:32713 ms4.4%
BaseDatabaseWrapper._commitdjango/db/backends/base/base.py:30313 ms4.4%
Connection.commitpsycopg/connection.py:30913 ms4.4%
Connection.waitpsycopg/connection.py:49513 ms4.4%
Command.handledjango/core/management/commands/flush.py:9250 ms17.0%
emit_post_migrate_signaldjango/core/management/sql.py:5250 ms17.0%
Signal.senddjango/dispatch/dispatcher.py:20950 ms17.0%
create_permissionsdjango/contrib/auth/management/__init__.py:6113 ms4.4%
create_contenttypesdjango/contrib/contenttypes/management/__init__.py:1326 ms2.2%
QuerySet.bulk_createdjango/db/models/query.py:8336 ms2.2%
QuerySet._batched_insertdjango/db/models/query.py:19565 ms1.7%
QuerySet._insertdjango/db/models/query.py:19185 ms1.7%
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%
1 smaller frames hidden
create_contenttypesdjango/contrib/contenttypes/management/__init__.py:1226 ms2.2%
QuerySet.__iter__django/db/models/query.py:3906 ms2.2%
QuerySet._fetch_alldjango/db/models/query.py:20006 ms2.2%
FlatValuesListIterable.__iter__django/db/models/query.py:2776 ms2.2%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15736 ms2.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16246 ms2.2%
CursorWrapper.executedjango/db/backends/utils.py:796 ms2.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:926 ms2.2%
CursorWrapper._executedjango/db/backends/utils.py:1056 ms2.2%
Cursor.executepsycopg/cursor.py:1136 ms2.2%
Connection.waitpsycopg/connection.py:4956 ms2.2%
create_permissionsdjango/contrib/auth/management/__init__.py:10712 ms3.9%
QuerySet.bulk_createdjango/db/models/query.py:83310 ms3.5%
QuerySet._batched_insertdjango/db/models/query.py:195610 ms3.5%
QuerySet._insertdjango/db/models/query.py:191810 ms3.5%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19259 ms3.1%
CursorWrapper.executedjango/db/backends/utils.py:799 ms3.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:929 ms3.1%
CursorWrapper._executedjango/db/backends/utils.py:1059 ms3.1%
Cursor.executepsycopg/cursor.py:1139 ms3.1%
Connection.waitpsycopg/connection.py:4959 ms3.1%
1 smaller frames hidden
1 smaller frames hidden
create_permissionsdjango/contrib/auth/management/__init__.py:8012 ms3.9%
ContentTypeManager.get_for_modelsdjango/contrib/contenttypes/models.py:918 ms2.6%
QuerySet.__iter__django/db/models/query.py:3908 ms2.6%
QuerySet._fetch_alldjango/db/models/query.py:20008 ms2.6%
ModelIterable.__iter__django/db/models/query.py:958 ms2.6%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16248 ms2.6%
CursorWrapper.executedjango/db/backends/utils.py:798 ms2.6%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:928 ms2.6%
CursorWrapper._executedjango/db/backends/utils.py:1058 ms2.6%
Cursor.executepsycopg/cursor.py:1138 ms2.6%
Connection.waitpsycopg/connection.py:4958 ms2.6%
ContentTypeManager.get_for_modelsdjango/contrib/contenttypes/models.py:904 ms1.3%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:874 ms1.3%
QuerySet.filterdjango/db/models/query.py:15423 ms0.9%
QuerySet._filter_or_excludedjango/db/models/query.py:15603 ms0.9%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:15703 ms0.9%
Query.add_qdjango/db/models/sql/query.py:16713 ms0.9%
Query._add_qdjango/db/models/sql/query.py:17033 ms0.9%
Query.build_filterdjango/db/models/sql/query.py:15283 ms0.9%
Query._add_qdjango/db/models/sql/query.py:17033 ms0.9%
Query.build_filterdjango/db/models/sql/query.py:15283 ms0.9%
create_permissionsdjango/contrib/auth/management/__init__.py:879 ms3.1%
QuerySet.__iter__django/db/models/query.py:3909 ms3.1%
QuerySet._fetch_alldjango/db/models/query.py:20009 ms3.1%
ValuesListIterable.__iter__django/db/models/query.py:2389 ms3.1%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15739 ms3.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16248 ms2.6%
CursorWrapper.executedjango/db/backends/utils.py:798 ms2.6%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:928 ms2.6%
CursorWrapper._executedjango/db/backends/utils.py:1058 ms2.6%
Cursor.executepsycopg/cursor.py:1138 ms2.6%
Connection.waitpsycopg/connection.py:4958 ms2.6%
1 smaller frames hidden
create_contenttypesdjango/contrib/contenttypes/management/__init__.py:1225 ms1.7%
QuerySet.__iter__django/db/models/query.py:3905 ms1.7%
QuerySet._fetch_alldjango/db/models/query.py:20005 ms1.7%
FlatValuesListIterable.__iter__django/db/models/query.py:2775 ms1.7%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15735 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16245 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:795 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:925 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1054 ms1.3%
Cursor.executepsycopg/cursor.py:1134 ms1.3%
Connection.waitpsycopg/connection.py:4954 ms1.3%
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:1033 ms0.9%
Cursor.executepsycopg/cursor.py:1133 ms0.9%
Connection.waitpsycopg/connection.py:4953 ms0.9%
IngestStartEndpointTest.test_ingest_end_after_progressapps/api/tests.py:246 self.join_workers()72 ms24.4%
IngestStartEndpointTest.join_workersapps/api/tests.py:76 drain(current_app(), raise_on_failure=True)72 ms24.4%
drainpotatoq/testing.py:7371 ms24.0%
executepotatoq/worker/executor.py:28871 ms24.0%
_executepotatoq/worker/executor.py:36866 ms22.2%
Task.__call__potatoq/task.py:19266 ms22.2%
warm_reportsapps/api/tasks.py:266 flaky_report(Project.objects.get(pk=project_id), DEFAULT_DAYS)22 ms7.4%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:8713 ms4.4%
QuerySet.getdjango/db/models/query.py:63513 ms4.4%
QuerySet.__len__django/db/models/query.py:37213 ms4.4%
QuerySet._fetch_alldjango/db/models/query.py:200013 ms4.4%
ModelIterable.__iter__django/db/models/query.py:9513 ms4.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162212 ms3.9%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2612 ms3.9%
BaseDatabaseWrapper.cursordjango/db/backends/base/base.py:32012 ms3.9%
BaseDatabaseWrapper._cursordjango/db/backends/base/base.py:29612 ms3.9%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:30312 ms3.9%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2612 ms3.9%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:27912 ms3.9%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2612 ms3.9%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:25610 ms3.5%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.5%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:33310 ms3.5%
Connection.connectpsycopg/connection.py:1099 ms3.1%
wait_connpsycopg/waiting.py:1415 ms1.7%
EpollSelector.select<stdlib>/selectors.py:4525 ms1.7%
wait_connpsycopg/waiting.py:1454 ms1.3%
BaseConnection._connect_genpsycopg/_connection_base.py:4394 ms1.3%
1 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
flaky_reportapps/projects/flakiness.py:2535 ms1.7%
compute_flaky_reportapps/projects/flakiness.py:2684 ms1.3%
failing_test_idsapps/projects/flakiness.py:202 ids = set(3 ms0.9%
QuerySet.__iter__django/db/models/query.py:3903 ms0.9%
QuerySet._fetch_alldjango/db/models/query.py:20003 ms0.9%
FlatValuesListIterable.__iter__django/db/models/query.py:2773 ms0.9%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15733 ms0.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16243 ms0.9%
CursorWrapper.executedjango/db/backends/utils.py:793 ms0.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms0.9%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms0.9%
Cursor.executepsycopg/cursor.py:1133 ms0.9%
Connection.waitpsycopg/connection.py:4953 ms0.9%
1 smaller frames hidden
1 smaller frames hidden
flaky_reportapps/projects/flakiness.py:2504 ms1.3%
data_versionapps/projects/flakiness.py:229 profile = Profile.objects.filter(project=project).aggregate(latest=Max("date_processed"))["latest"]3 ms0.9%
QuerySet.aggregatedjango/db/models/query.py:5943 ms0.9%
Query.get_aggregationdjango/db/models/sql/query.py:6333 ms0.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16243 ms0.9%
CursorWrapper.executedjango/db/backends/utils.py:793 ms0.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms0.9%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms0.9%
Cursor.executepsycopg/cursor.py:1133 ms0.9%
Connection.waitpsycopg/connection.py:4953 ms0.9%
1 smaller frames hidden
Atomic.__enter__django/db/transaction.py:19821 ms7.0%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:45421 ms7.0%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:30321 ms7.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2621 ms7.0%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:27921 ms7.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2621 ms7.0%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:25621 ms7.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2621 ms7.0%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:33321 ms7.0%
Connection.connectpsycopg/connection.py:10919 ms6.5%
wait_connpsycopg/waiting.py:14514 ms4.8%
BaseConnection._connect_genpsycopg/_connection_base.py:43913 ms4.4%
1 smaller frames hidden
wait_connpsycopg/waiting.py:1414 ms1.3%
EpollSelector.select<stdlib>/selectors.py:4524 ms1.3%
1 smaller frames hidden
1 smaller frames hidden
process_ingest_progressapps/api/tasks.py:1214 ms1.3%
TestManager.upsertapps/projects/models.py:2293 ms0.9%
1 smaller frames hidden
Atomic.__exit__django/db/transaction.py:2633 ms0.9%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:263 ms0.9%
BaseDatabaseWrapper.commitdjango/db/backends/base/base.py:3273 ms0.9%
BaseDatabaseWrapper._commitdjango/db/backends/base/base.py:3033 ms0.9%
Connection.commitpsycopg/connection.py:3093 ms0.9%
Connection.waitpsycopg/connection.py:4953 ms0.9%
process_ingest_progressapps/api/tasks.py:118 session = Session.objects.get(project=ingest.project, ingest_id=parent_ingest_id)3 ms0.9%
process_ingest_progressapps/api/tasks.py:165 TestRun.objects.bulk_create(3 ms0.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms0.9%
QuerySet.bulk_createdjango/db/models/query.py:8333 ms0.9%
QuerySet._batched_insertdjango/db/models/query.py:19563 ms0.9%
QuerySet._insertdjango/db/models/query.py:19183 ms0.9%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19253 ms0.9%
CursorWrapper.executedjango/db/backends/utils.py:793 ms0.9%
process_ingest_endapps/api/tasks.py:210 session = Session.objects.get(project=ingest.project, ingest_id=parent_ingest_id)3 ms0.9%
7 smaller frames hidden
_executepotatoq/worker/executor.py:4105 ms1.7%
Signal.sendpotatoq/signals.py:1195 ms1.7%
_close_old_connectionspotatoq/contrib/django/__init__.py:2743 ms0.9%
iscoroutinefunction<stdlib>/inspect.py:3343 ms0.9%
_has_code_flag<stdlib>/inspect.py:3013 ms0.9%
1 smaller frames hidden
IngestStartEndpointTest.test_ingest_end_after_progressapps/api/tests.py:23932 ms10.9%
IngestStartEndpointTest.ingest_startapps/api/tests.py:98 return self.client.post(32 ms10.9%
Client.postdjango/test/client.py:115332 ms10.9%
RequestFactory.postdjango/test/client.py:49932 ms10.9%
RequestFactory.genericdjango/test/client.py:67132 ms10.9%
Client.requestdjango/test/client.py:108232 ms10.9%
ClientHandler.__call__django/test/client.py:18621 ms7.0%
BaseHandler.get_responsedjango/core/handlers/base.py:14121 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5521 ms7.0%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:13021 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5521 ms7.0%
MiddlewareMixin.__call__django/utils/deprecation.py:30921 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5521 ms7.0%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12321 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5521 ms7.0%
MiddlewareMixin.__call__django/utils/deprecation.py:30921 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5521 ms7.0%
MiddlewareMixin.__call__django/utils/deprecation.py:30921 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5521 ms7.0%
MiddlewareMixin.__call__django/utils/deprecation.py:30921 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5521 ms7.0%
MiddlewareMixin.__call__django/utils/deprecation.py:30921 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5521 ms7.0%
MiddlewareMixin.__call__django/utils/deprecation.py:30921 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5521 ms7.0%
MiddlewareMixin.__call__django/utils/deprecation.py:30921 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5521 ms7.0%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:3421 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5521 ms7.0%
BaseHandler._get_responsedjango/core/handlers/base.py:19821 ms7.0%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:6521 ms7.0%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:3721 ms7.0%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:6421 ms7.0%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:7515 ms5.2%
ingest_startapps/api/urls.py:100 process_ingest_start(ingest.id)13 ms4.4%
_SharedTaskProxy.__call__potatoq/app.py:76313 ms4.4%
Task.__call__potatoq/task.py:18913 ms4.4%
process_ingest_startapps/api/tasks.py:773 ms0.9%
process_ingest_startapps/api/tasks.py:843 ms0.9%
get_or_create_environmentapps/projects/environments.py:63 obj, created = Environment.objects.get_or_create(3 ms0.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms0.9%
process_ingest_startapps/api/tasks.py:89 Session.objects.get_or_create(3 ms0.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms0.9%
4 smaller frames hidden
2 smaller frames hidden
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:72 project = get_object_or_404(Project, secrettokens__token=request.headers.get("Authorization"))3 ms0.9%
get_object_or_404django/shortcuts.py:903 ms0.9%
QuerySet.getdjango/db/models/query.py:6353 ms0.9%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:73 touch_token(request.headers.get("Authorization"))3 ms0.9%
ClientHandler.__call__django/test/client.py:17312 ms3.9%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6212 ms3.9%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10412 ms3.9%
WhiteNoise.add_fileswhitenoise/base.py:10812 ms3.9%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1208 ms2.6%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1318 ms2.6%
WhiteNoise.get_static_filewhitenoise/base.py:2085 ms1.7%
StaticFile.__init__whitenoise/responders.py:773 ms0.9%
2 smaller frames hidden
WhiteNoise.get_static_filewhitenoise/base.py:2033 ms0.9%
WhiteNoise.add_cache_headerswhitenoise/base.py:2243 ms0.9%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1763 ms0.9%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1973 ms0.9%
URLMixin.urldebug_toolbar/panels/staticfiles.py:203 ms0.9%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2053 ms0.9%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:1863 ms0.9%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1154 ms1.3%
scantreewhitenoise/base.py:2624 ms1.3%
scantreewhitenoise/base.py:2624 ms1.3%
scantreewhitenoise/base.py:2623 ms0.9%
scantreewhitenoise/base.py:2623 ms0.9%
scantreewhitenoise/base.py:2623 ms0.9%
1 smaller frames hidden
IngestStartEndpointTest.test_ingest_end_after_progressapps/api/tests.py:25524 ms8.3%
IngestStartEndpointTest.join_workersapps/api/tests.py:76 drain(current_app(), raise_on_failure=True)24 ms8.3%
drainpotatoq/testing.py:7323 ms7.8%
executepotatoq/worker/executor.py:28823 ms7.8%
_executepotatoq/worker/executor.py:36823 ms7.8%
Task.__call__potatoq/task.py:19223 ms7.8%
Atomic.__enter__django/db/transaction.py:19810 ms3.5%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:45410 ms3.5%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:30310 ms3.5%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.5%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:27910 ms3.5%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.5%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2569 ms3.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms3.1%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:3339 ms3.1%
Connection.connectpsycopg/connection.py:1099 ms3.1%
wait_connpsycopg/waiting.py:1415 ms1.7%
EpollSelector.select<stdlib>/selectors.py:4525 ms1.7%
wait_connpsycopg/waiting.py:1454 ms1.3%
BaseConnection._connect_genpsycopg/_connection_base.py:4394 ms1.3%
1 smaller frames hidden
process_ingest_progressapps/api/tasks.py:1214 ms1.3%
TestManager.upsertapps/projects/models.py:2293 ms0.9%
1 smaller frames hidden
process_ingest_progressapps/api/tasks.py:118 session = Session.objects.get(project=ingest.project, ingest_id=parent_ingest_id)3 ms0.9%
process_ingest_progressapps/api/tasks.py:165 TestRun.objects.bulk_create(3 ms0.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms0.9%
QuerySet.bulk_createdjango/db/models/query.py:8333 ms0.9%
QuerySet._batched_insertdjango/db/models/query.py:19563 ms0.9%
QuerySet._insertdjango/db/models/query.py:19183 ms0.9%
3 smaller frames hidden
1 smaller frames hidden
IngestStartEndpointTest.test_ingest_end_after_progressapps/api/tests.py:24815 ms5.2%
IngestStartEndpointTest.ingest_progressapps/api/tests.py:10615 ms5.2%
Client.postdjango/test/client.py:115315 ms5.2%
RequestFactory.postdjango/test/client.py:49915 ms5.2%
RequestFactory.genericdjango/test/client.py:67115 ms5.2%
Client.requestdjango/test/client.py:108215 ms5.2%
ClientHandler.__call__django/test/client.py:18615 ms5.2%
BaseHandler.get_responsedjango/core/handlers/base.py:14115 ms5.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.2%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:13015 ms5.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.2%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.2%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12315 ms5.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.2%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.2%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.2%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.2%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.2%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.2%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.2%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:3415 ms5.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.2%
BaseHandler._get_responsedjango/core/handlers/base.py:19815 ms5.2%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:6515 ms5.2%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:3715 ms5.2%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:6415 ms5.2%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:72 project = get_object_or_404(Project, secrettokens__token=request.headers.get("Authorization"))12 ms3.9%
get_object_or_404django/shortcuts.py:9012 ms3.9%
QuerySet.getdjango/db/models/query.py:63512 ms3.9%
QuerySet.__len__django/db/models/query.py:37212 ms3.9%
QuerySet._fetch_alldjango/db/models/query.py:200012 ms3.9%
ModelIterable.__iter__django/db/models/query.py:9512 ms3.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16229 ms3.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms3.1%
BaseDatabaseWrapper.cursordjango/db/backends/base/base.py:3209 ms3.1%
BaseDatabaseWrapper._cursordjango/db/backends/base/base.py:2969 ms3.1%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:3039 ms3.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms3.1%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:2799 ms3.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms3.1%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2569 ms3.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms3.1%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:3339 ms3.1%
Connection.connectpsycopg/connection.py:1099 ms3.1%
wait_connpsycopg/waiting.py:1415 ms1.7%
EpollSelector.select<stdlib>/selectors.py:4525 ms1.7%
wait_connpsycopg/waiting.py:1454 ms1.3%
BaseConnection._connect_genpsycopg/_connection_base.py:4394 ms1.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16243 ms0.9%
CursorWrapper.executedjango/db/backends/utils.py:793 ms0.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms0.9%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms0.9%
Cursor.executepsycopg/cursor.py:1133 ms0.9%
Connection.waitpsycopg/connection.py:4953 ms0.9%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:753 ms0.9%
ingest_progressapps/api/urls.py:1113 ms0.9%
1 smaller frames hidden
IngestStartEndpointTest.setUpapps/api/tests.py:73 self.project = baker.make("projects.Project", secrettokens_set__token=self.secret_token)15 ms5.2%
makemodel_bakery/baker.py:14715 ms5.2%
Baker.makemodel_bakery/baker.py:40615 ms5.2%
Baker._makemodel_bakery/baker.py:47112 ms3.9%
Baker.generate_valuemodel_bakery/baker.py:80012 ms3.9%
gen_relatedmodel_bakery/random_gen.py:27412 ms3.9%
makemodel_bakery/baker.py:14712 ms3.9%
Baker.makemodel_bakery/baker.py:40612 ms3.9%
Baker._makemodel_bakery/baker.py:48212 ms3.9%
Baker.instancemodel_bakery/baker.py:53512 ms3.9%
Model.savedjango/db/models/base.py:87412 ms3.9%
Model.save_basedjango/db/models/base.py:96612 ms3.9%
Model._save_tabledjango/db/models/base.py:116712 ms3.9%
Model._do_insertdjango/db/models/base.py:121812 ms3.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:8712 ms3.9%
QuerySet._insertdjango/db/models/query.py:191812 ms3.9%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19239 ms3.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms3.1%
BaseDatabaseWrapper.cursordjango/db/backends/base/base.py:3209 ms3.1%
BaseDatabaseWrapper._cursordjango/db/backends/base/base.py:2969 ms3.1%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:3039 ms3.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms3.1%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:2799 ms3.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms3.1%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2568 ms2.6%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:268 ms2.6%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:3338 ms2.6%
Connection.connectpsycopg/connection.py:1098 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
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19253 ms0.9%
CursorWrapper.executedjango/db/backends/utils.py:793 ms0.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms0.9%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms0.9%
Cursor.executepsycopg/cursor.py:1133 ms0.9%
Connection.waitpsycopg/connection.py:4953 ms0.9%
Baker._makemodel_bakery/baker.py:4903 ms0.9%
Baker.create_by_related_namemodel_bakery/baker.py:5603 ms0.9%
makemodel_bakery/baker.py:1473 ms0.9%
Baker.makemodel_bakery/baker.py:4063 ms0.9%
1 smaller frames hidden
IngestStartEndpointTest.test_ingest_end_after_progressapps/api/tests.py:257 run = Run.objects.filter(project=self.project).get()13 ms4.4%
QuerySet.getdjango/db/models/query.py:63513 ms4.4%
QuerySet.__len__django/db/models/query.py:37213 ms4.4%
QuerySet._fetch_alldjango/db/models/query.py:200013 ms4.4%
ModelIterable.__iter__django/db/models/query.py:9513 ms4.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162210 ms3.5%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.5%
BaseDatabaseWrapper.cursordjango/db/backends/base/base.py:32010 ms3.5%
BaseDatabaseWrapper._cursordjango/db/backends/base/base.py:29610 ms3.5%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:30310 ms3.5%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.5%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:27910 ms3.5%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.5%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2569 ms3.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms3.1%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:3339 ms3.1%
Connection.connectpsycopg/connection.py:1099 ms3.1%
wait_connpsycopg/waiting.py:1415 ms1.7%
EpollSelector.select<stdlib>/selectors.py:4525 ms1.7%
wait_connpsycopg/waiting.py:1454 ms1.3%
BaseConnection._connect_genpsycopg/_connection_base.py:4394 ms1.3%
1 smaller frames hidden
2 smaller frames hidden
IngestStartEndpointTest.test_ingest_end_after_progressapps/api/tests.py:2444 ms1.3%
IngestStartEndpointTest.ingest_endapps/api/tests.py:1144 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%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:73 touch_token(request.headers.get("Authorization"))3 ms0.9%
1 smaller frames hidden
2 smaller frames hidden
Estimated from 229 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
|
44 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
|
15 ms |
|
apps/api/tests.py:73
self.project = baker.make("projects.Project", secrettokens_set__token=self.secret_token)
IngestStartEndpointTest.setUp
· Database
|
15 ms |
|
apps/api/tasks.py:266
flaky_report(Project.objects.get(pk=project_id), DEFAULT_DAYS)
warm_reports
· Database
|
13 ms |
|
apps/api/tests.py:257
run = Run.objects.filter(project=self.project).get()
IngestStartEndpointTest.test_ingest_end_after_progress
· Database
|
13 ms |
|
apps/api/tests.py:98
return self.client.post(
IngestStartEndpointTest.ingest_start
· Libraries
|
12 ms |
|
apps/api/tasks.py:118
session = Session.objects.get(project=ingest.project, ingest_id=parent_ingest_id)
process_ingest_progress
· Database
|
5 ms |
|
apps/api/tasks.py:165
TestRun.objects.bulk_create(
process_ingest_progress
· Database
|
5 ms |
|
apps/projects/flakiness.py:202
ids = set(
failing_test_ids
· Database
|
3 ms |
|
apps/api/urls.py:73
touch_token(request.headers.get("Authorization"))
api_request.<locals>.decorator.<locals>.wrapped_view
· Database
|
3 ms |
Fixtures
Exact setup time| _django_db_marker function | 0.06 ms |
| _live_server_helper function | 0.06 ms |
| _django_set_urlconf function | 0.06 ms |
| _dj_autoclear_mailbox function | 0.06 ms |
| _template_string_if_invalid_marker function | 0.06 ms |
| _django_clear_site_cache function | 0.04 ms |
| monkeypatch function | 0.03 ms |
Database
133 queries · 118 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:246
|
164 ms |
|
call _post_teardown
django/test/testcases.py:1240
|
115 ms |
|
call setUp
apps/api/tests.py:73
|
15 ms |
|
setup __init__
__init__:-1
|
1 ms |
Reliability
5 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 50 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 22 minutes ago | CI github-actions:test | passed | 296 ms | Profile |
| 47 minutes ago | CI github-actions:test | passed | 304 ms | Profile |
| 7 hours ago | CI github-actions:test | passed | 468 ms | Profile |
| 7 hours ago | CI github-actions:test | passed | 184 ms | Profile |
| 7 hours ago | CI github-actions:test | passed | 304 ms | Profile |
| 2 years ago | CI github-actions | passed | 494 ms | Run |
| 2 years, 2 months ago | CI github-actions | passed | 576 ms | Run |
| 2 years, 3 months ago | CI github-actions | passed | 1.66 s | Run |
| 2 years, 4 months ago | CI github-actions | passed | 662 ms | Run |
| 2 years, 4 months ago | CI github-actions | passed | 630 ms | Run |
| 2 years, 4 months ago | CI github-actions | passed | 719 ms | Run |
| 2 years, 4 months ago | CI github-actions | passed | 559 ms | Run |
| 2 years, 5 months ago | CI github-actions | passed | 644 ms | Run |
| 2 years, 5 months ago | CI github-actions | passed | 587 ms | Run |
| 2 years, 5 months ago | CI github-actions | passed | 612 ms | Run |
| 2 years, 5 months ago | CI github-actions | passed | 542 ms | Run |
| 2 years, 5 months ago | CI github-actions | passed | 1.73 s | Run |
| 2 years, 6 months ago | CI github-actions | passed | 539 ms | Run |
| 2 years, 6 months ago | CI github-actions | passed | 555 ms | Run |
| 2 years, 6 months ago | CI github-actions | passed | 608 ms | Run |