Tests / apps/api/tests.py
IngestStartEndpointTest::test_ingest_progress_before_start
First seen 2 years, 9 months ago in 9ff0a7e
CI
github-actions:test
5 runs
Average
288 ms
median 299 ms
max 344 ms
max 344 ms
Phases
Setup 1 ms
Call 287 ms
Teardown 0.34 ms
Categories
Database 154 ms
Factories 0.64 ms
App code 0.52 ms
Other (DB schema, Libraries, Imports, Unsampled, ...) 133 ms
133 database queries per run
Needs 17 KB of memory (max 44 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 13 minutes ago ·
open run
call298 ms99.6%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()113 ms37.8%
TransactionTestCase._fixture_teardowndjango/test/testcases.py:1275113 ms37.8%
call_commanddjango/core/management/__init__.py:195113 ms37.8%
BaseCommand.executedjango/core/management/base.py:460113 ms37.8%
Command.handledjango/core/management/commands/flush.py:7468 ms22.8%
BaseDatabaseOperations.execute_sql_flushdjango/db/backends/base/operations.py:46855 ms18.5%
CursorWrapper.executedjango/db/backends/utils.py:7955 ms18.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9255 ms18.5%
CursorWrapper._executedjango/db/backends/utils.py:10355 ms18.5%
Cursor.executepsycopg/cursor.py:11355 ms18.5%
Connection.waitpsycopg/connection.py:49555 ms18.5%
BaseDatabaseOperations.execute_sql_flushdjango/db/backends/base/operations.py:46213 ms4.3%
Atomic.__exit__django/db/transaction.py:26313 ms4.3%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2613 ms4.3%
BaseDatabaseWrapper.commitdjango/db/backends/base/base.py:32713 ms4.3%
BaseDatabaseWrapper._commitdjango/db/backends/base/base.py:30313 ms4.3%
Connection.commitpsycopg/connection.py:30913 ms4.3%
Connection.waitpsycopg/connection.py:49513 ms4.3%
Command.handledjango/core/management/commands/flush.py:9240 ms13.3%
emit_post_migrate_signaldjango/core/management/sql.py:5240 ms13.3%
Signal.senddjango/dispatch/dispatcher.py:20940 ms13.3%
create_permissionsdjango/contrib/auth/management/__init__.py:6114 ms4.7%
create_contenttypesdjango/contrib/contenttypes/management/__init__.py:1228 ms2.6%
QuerySet.__iter__django/db/models/query.py:3908 ms2.6%
QuerySet._fetch_alldjango/db/models/query.py:20008 ms2.6%
FlatValuesListIterable.__iter__django/db/models/query.py:2778 ms2.6%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15738 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%
create_contenttypesdjango/contrib/contenttypes/management/__init__.py:1326 ms2.1%
QuerySet.bulk_createdjango/db/models/query.py:8335 ms1.7%
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:19255 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:1055 ms1.7%
Cursor.executepsycopg/cursor.py:1135 ms1.7%
Connection.waitpsycopg/connection.py:4955 ms1.7%
1 smaller frames hidden
create_permissionsdjango/contrib/auth/management/__init__.py:10710 ms3.4%
QuerySet.bulk_createdjango/db/models/query.py:83310 ms3.4%
QuerySet._batched_insertdjango/db/models/query.py:195610 ms3.4%
QuerySet._insertdjango/db/models/query.py:191810 ms3.4%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19259 ms3.0%
CursorWrapper.executedjango/db/backends/utils.py:799 ms3.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:929 ms3.0%
CursorWrapper._executedjango/db/backends/utils.py:1059 ms3.0%
Cursor.executepsycopg/cursor.py:1139 ms3.0%
Connection.waitpsycopg/connection.py:4959 ms3.0%
1 smaller frames hidden
create_permissionsdjango/contrib/auth/management/__init__.py:878 ms2.6%
QuerySet.__iter__django/db/models/query.py:3908 ms2.6%
QuerySet._fetch_alldjango/db/models/query.py:20008 ms2.6%
ValuesListIterable.__iter__django/db/models/query.py:2388 ms2.6%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15738 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:16113 ms0.9%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7673 ms0.9%
1 smaller frames hidden
create_permissionsdjango/contrib/auth/management/__init__.py:804 ms1.3%
ContentTypeManager.get_for_modelsdjango/contrib/contenttypes/models.py:914 ms1.3%
QuerySet.__iter__django/db/models/query.py:3904 ms1.3%
QuerySet._fetch_alldjango/db/models/query.py:20004 ms1.3%
ModelIterable.__iter__django/db/models/query.py:954 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%
1 smaller frames hidden
create_contenttypesdjango/contrib/contenttypes/management/__init__.py:1223 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
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_progress_before_startapps/api/tests.py:234 self.join_workers()64 ms21.5%
IngestStartEndpointTest.join_workersapps/api/tests.py:76 drain(current_app(), raise_on_failure=True)64 ms21.5%
drainpotatoq/testing.py:7363 ms21.0%
executepotatoq/worker/executor.py:28863 ms21.0%
_executepotatoq/worker/executor.py:36863 ms21.0%
Task.__call__potatoq/task.py:19263 ms21.0%
Atomic.__enter__django/db/transaction.py:19822 ms7.3%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:45422 ms7.3%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:30322 ms7.3%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2622 ms7.3%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:27922 ms7.3%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2622 ms7.3%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:25621 ms6.9%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2621 ms6.9%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:33321 ms6.9%
Connection.connectpsycopg/connection.py:10921 ms6.9%
wait_connpsycopg/waiting.py:14510 ms3.4%
BaseConnection._connect_genpsycopg/_connection_base.py:43910 ms3.4%
wait_connpsycopg/waiting.py:14110 ms3.4%
EpollSelector.select<stdlib>/selectors.py:4529 ms3.0%
1 smaller frames hidden
1 smaller frames hidden
warm_reportsapps/api/tasks.py:266 flaky_report(Project.objects.get(pk=project_id), DEFAULT_DAYS)17 ms5.6%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:8712 ms3.9%
QuerySet.getdjango/db/models/query.py:63510 ms3.4%
QuerySet.__len__django/db/models/query.py:37210 ms3.4%
QuerySet._fetch_alldjango/db/models/query.py:200010 ms3.4%
ModelIterable.__iter__django/db/models/query.py:9510 ms3.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16229 ms3.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms3.0%
BaseDatabaseWrapper.cursordjango/db/backends/base/base.py:3209 ms3.0%
BaseDatabaseWrapper._cursordjango/db/backends/base/base.py:2969 ms3.0%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:3039 ms3.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms3.0%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:2799 ms3.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms3.0%
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
1 smaller frames hidden
1 smaller frames hidden
flaky_reportapps/projects/flakiness.py:2503 ms0.9%
flaky_reportapps/projects/flakiness.py:2533 ms0.9%
compute_flaky_reportapps/projects/flakiness.py:2683 ms0.9%
process_ingest_progressapps/api/tasks.py:1215 ms1.7%
TestManager.upsertapps/projects/models.py:2293 ms0.9%
2 smaller frames hidden
process_ingest_progressapps/api/tasks.py:118 session = Session.objects.get(project=ingest.project, ingest_id=parent_ingest_id)4 ms1.3%
ForwardManyToOneDescriptor.__get__django/db/models/fields/related_descriptors.py:2573 ms0.9%
ForwardManyToOneDescriptor.get_objectdjango/db/models/fields/related_descriptors.py:2223 ms0.9%
1 smaller frames hidden
process_ingest_endapps/api/tasks.py:206 ingest = Ingest.objects.select_for_update().get(id=ingest_id)3 ms0.9%
process_ingest_endapps/api/tasks.py:210 session = Session.objects.get(project=ingest.project, ingest_id=parent_ingest_id)3 ms0.9%
8 smaller frames hidden
1 smaller frames hidden
IngestStartEndpointTest.test_ingest_progress_before_startapps/api/tests.py:21642 ms14.2%
IngestStartEndpointTest.ingest_startapps/api/tests.py:98 return self.client.post(42 ms14.2%
Client.postdjango/test/client.py:115342 ms14.2%
RequestFactory.postdjango/test/client.py:49942 ms14.2%
RequestFactory.genericdjango/test/client.py:67142 ms14.2%
Client.requestdjango/test/client.py:108242 ms14.2%
ClientHandler.__call__django/test/client.py:18623 ms7.7%
BaseHandler.get_responsedjango/core/handlers/base.py:14123 ms7.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5523 ms7.7%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:13023 ms7.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5523 ms7.7%
MiddlewareMixin.__call__django/utils/deprecation.py:30923 ms7.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5523 ms7.7%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12323 ms7.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5523 ms7.7%
MiddlewareMixin.__call__django/utils/deprecation.py:30923 ms7.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5523 ms7.7%
MiddlewareMixin.__call__django/utils/deprecation.py:30923 ms7.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5523 ms7.7%
MiddlewareMixin.__call__django/utils/deprecation.py:30923 ms7.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5523 ms7.7%
MiddlewareMixin.__call__django/utils/deprecation.py:30923 ms7.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5523 ms7.7%
MiddlewareMixin.__call__django/utils/deprecation.py:30923 ms7.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5523 ms7.7%
MiddlewareMixin.__call__django/utils/deprecation.py:30923 ms7.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5523 ms7.7%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:3423 ms7.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5523 ms7.7%
BaseHandler._get_responsedjango/core/handlers/base.py:19823 ms7.7%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:6523 ms7.7%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:3723 ms7.7%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:6423 ms7.7%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:7517 ms5.6%
ingest_startapps/api/urls.py:100 process_ingest_start(ingest.id)13 ms4.3%
_SharedTaskProxy.__call__potatoq/app.py:76313 ms4.3%
Task.__call__potatoq/task.py:18913 ms4.3%
process_ingest_startapps/api/tasks.py:775 ms1.7%
get_or_create_numberedapps/projects/models.py:18 existing = model.objects.filter(project=project, **lookup).first()3 ms0.9%
QuerySet.firstdjango/db/models/query.py:11453 ms0.9%
QuerySet.__iter__django/db/models/query.py:3903 ms0.9%
QuerySet._fetch_alldjango/db/models/query.py:20003 ms0.9%
2 smaller frames hidden
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%
2 smaller frames hidden
ingest_startapps/api/urls.py:95 "muted_tests": [{"name": test.name} for test in muted_tests],3 ms0.9%
QuerySet.__iter__django/db/models/query.py:3903 ms0.9%
QuerySet._fetch_alldjango/db/models/query.py:20003 ms0.9%
ModelIterable.__iter__django/db/models/query.py:953 ms0.9%
1 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"))4 ms1.3%
get_object_or_404django/shortcuts.py:904 ms1.3%
QuerySet.getdjango/db/models/query.py:6353 ms0.9%
QuerySet.__len__django/db/models/query.py:3723 ms0.9%
QuerySet._fetch_alldjango/db/models/query.py:20003 ms0.9%
ModelIterable.__iter__django/db/models/query.py:953 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
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:17318 ms6.0%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6218 ms6.0%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10418 ms6.0%
WhiteNoise.add_fileswhitenoise/base.py:10818 ms6.0%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12012 ms3.9%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13112 ms3.9%
WhiteNoise.get_static_filewhitenoise/base.py:20810 ms3.4%
StaticFile.__init__whitenoise/responders.py:736 ms2.1%
StaticFile.__init__whitenoise/responders.py:774 ms1.3%
StaticFile.get_alternativeswhitenoise/responders.py:2003 ms0.9%
1 smaller frames hidden
1 smaller frames hidden
WhiteNoise.update_files_dictionarywhitenoise/base.py:1155 ms1.7%
scantreewhitenoise/base.py:2623 ms0.9%
scantreewhitenoise/base.py:2623 ms0.9%
scantreewhitenoise/base.py:2643 ms0.9%
1 smaller frames hidden
1 smaller frames hidden
IngestStartEndpointTest.test_ingest_progress_before_startapps/api/tests.py:22828 ms9.4%
IngestStartEndpointTest.join_workersapps/api/tests.py:76 drain(current_app(), raise_on_failure=True)28 ms9.4%
drainpotatoq/testing.py:7327 ms9.0%
executepotatoq/worker/executor.py:28827 ms9.0%
_executepotatoq/worker/executor.py:36827 ms9.0%
Task.__call__potatoq/task.py:19227 ms9.0%
Atomic.__enter__django/db/transaction.py:19812 ms3.9%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:45412 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.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.4%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:33310 ms3.4%
Connection.connectpsycopg/connection.py:10910 ms3.4%
wait_connpsycopg/waiting.py:1416 ms2.1%
EpollSelector.select<stdlib>/selectors.py:4526 ms2.1%
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:1215 ms1.7%
TestManager.upsertapps/projects/models.py:2293 ms0.9%
TestManager.upsertapps/projects/models.py:230 self.bulk_create( # sorted, so uploads sharing tests lock their rows in the same order3 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%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms0.9%
process_ingest_progressapps/api/tasks.py:1853 ms0.9%
6 smaller frames hidden
1 smaller frames hidden
IngestStartEndpointTest.test_ingest_progress_before_startapps/api/tests.py:23017 ms5.6%
IngestStartEndpointTest.ingest_endapps/api/tests.py:11417 ms5.6%
Client.postdjango/test/client.py:115317 ms5.6%
RequestFactory.postdjango/test/client.py:49917 ms5.6%
RequestFactory.genericdjango/test/client.py:67117 ms5.6%
Client.requestdjango/test/client.py:108217 ms5.6%
ClientHandler.__call__django/test/client.py:18617 ms5.6%
BaseHandler.get_responsedjango/core/handlers/base.py:14117 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5517 ms5.6%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:13017 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5517 ms5.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30917 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5517 ms5.6%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12317 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5517 ms5.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30917 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5517 ms5.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30917 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5517 ms5.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30917 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5517 ms5.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30917 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5517 ms5.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30917 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5517 ms5.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30917 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5517 ms5.6%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:3417 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5517 ms5.6%
BaseHandler._get_responsedjango/core/handlers/base.py:19817 ms5.6%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:6517 ms5.6%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:3717 ms5.6%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:6417 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"))13 ms4.3%
get_object_or_404django/shortcuts.py:9013 ms4.3%
QuerySet.getdjango/db/models/query.py:63513 ms4.3%
QuerySet.__len__django/db/models/query.py:37213 ms4.3%
QuerySet._fetch_alldjango/db/models/query.py:200013 ms4.3%
ModelIterable.__iter__django/db/models/query.py:9513 ms4.3%
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:25612 ms3.9%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2612 ms3.9%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:33312 ms3.9%
Connection.connectpsycopg/connection.py:10912 ms3.9%
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%
wait_connpsycopg/waiting.py:1363 ms0.9%
BaseConnection._connect_genpsycopg/_connection_base.py:4393 ms0.9%
1 smaller frames hidden
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:73 touch_token(request.headers.get("Authorization"))3 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:192310 ms3.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.4%
BaseDatabaseWrapper.cursordjango/db/backends/base/base.py:32010 ms3.4%
BaseDatabaseWrapper._cursordjango/db/backends/base/base.py:29610 ms3.4%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:30310 ms3.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.4%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:27910 ms3.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.4%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:25610 ms3.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.4%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:33310 ms3.4%
Connection.connectpsycopg/connection.py:1099 ms3.0%
wait_connpsycopg/waiting.py:1415 ms1.7%
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
Baker._makemodel_bakery/baker.py:4823 ms0.9%
Baker.instancemodel_bakery/baker.py:5353 ms0.9%
Model.savedjango/db/models/base.py:8743 ms0.9%
Model.save_basedjango/db/models/base.py:9663 ms0.9%
Model._save_tabledjango/db/models/base.py:11673 ms0.9%
Model._do_insertdjango/db/models/base.py:12183 ms0.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 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%
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
IngestStartEndpointTest.test_ingest_progress_before_startapps/api/tests.py:235 run = Run.objects.filter(project=self.project).get()12 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:162210 ms3.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.4%
BaseDatabaseWrapper.cursordjango/db/backends/base/base.py:32010 ms3.4%
BaseDatabaseWrapper._cursordjango/db/backends/base/base.py:29610 ms3.4%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:30310 ms3.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.4%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:27910 ms3.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.4%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2569 ms3.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms3.0%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:3339 ms3.0%
Connection.connectpsycopg/connection.py:1099 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
IngestStartEndpointTest.test_ingest_progress_before_startapps/api/tests.py:2204 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%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:753 ms0.9%
1 smaller frames hidden
1 smaller frames hidden
Estimated from 232 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
|
39 ms |
|
apps/api/tests.py:98
return self.client.post(
IngestStartEndpointTest.ingest_start
· Libraries
|
19 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
|
17 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/tests.py:235
run = Run.objects.filter(project=self.project).get()
IngestStartEndpointTest.test_ingest_progress_before_start
· Database
|
12 ms |
|
apps/api/tasks.py:266
flaky_report(Project.objects.get(pk=project_id), DEFAULT_DAYS)
warm_reports
· Database
|
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/projects/models.py:230
self.bulk_create( # sorted, so uploads sharing tests lock their rows in the same order
TestManager.upsert
· Database
|
4 ms |
|
apps/api/urls.py:56
.filter(Q(date_last_used__lt=now - TOKEN_TOUCH_INTERVAL) | Q(date_last_used=None), token=token)
touch_token
· App code
|
3 ms |
|
apps/api/urls.py:95
"muted_tests": [{"name": test.name} for test in muted_tests],
ingest_start
· Database
|
3 ms |
Fixtures
Exact setup time| _django_db_marker function | 0.10 ms |
| _django_set_urlconf function | 0.06 ms |
| _template_string_if_invalid_marker function | 0.05 ms |
| _dj_autoclear_mailbox function | 0.05 ms |
| _live_server_helper function | 0.04 ms |
| _django_clear_site_cache function | 0.03 ms |
| monkeypatch function | 0.03 ms |
Database
133 queries · 123 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:234
|
168 ms |
|
call _post_teardown
django/test/testcases.py:1240
|
113 ms |
|
call setUp
apps/api/tests.py:73
|
15 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 | |
|---|---|---|---|---|
| 13 minutes ago | CI github-actions:test | passed | 299 ms | Profile |
| 38 minutes ago | CI github-actions:test | passed | 314 ms | Profile |
| 7 hours ago | CI github-actions:test | passed | 344 ms | Profile |
| 7 hours ago | CI github-actions:test | passed | 189 ms | Profile |
| 7 hours ago | CI github-actions:test | passed | 295 ms | Profile |
| 2 years ago | CI github-actions | passed | 475 ms | Run |
| 2 years, 2 months ago | CI github-actions | passed | 531 ms | Run |
| 2 years, 3 months ago | CI github-actions | passed | 710 ms | Run |
| 2 years, 4 months ago | CI github-actions | passed | 597 ms | Run |
| 2 years, 4 months ago | CI github-actions | passed | 618 ms | Run |
| 2 years, 4 months ago | CI github-actions | passed | 632 ms | Run |
| 2 years, 4 months ago | CI github-actions | passed | 543 ms | Run |
| 2 years, 5 months ago | CI github-actions | passed | 564 ms | Run |
| 2 years, 5 months ago | CI github-actions | passed | 527 ms | Run |
| 2 years, 5 months ago | CI github-actions | passed | 693 ms | Run |
| 2 years, 5 months ago | CI github-actions | passed | 527 ms | Run |
| 2 years, 5 months ago | CI github-actions | passed | 543 ms | Run |
| 2 years, 6 months ago | CI github-actions | passed | 526 ms | Run |
| 2 years, 6 months ago | CI github-actions | passed | 543 ms | Run |
| 2 years, 6 months ago | CI github-actions | passed | 585 ms | Run |