flakytest.dev anze3db flakytest
Tests / apps/api/tests.py

IngestStartEndpointTest::test_ingest_end_after_progress

First seen 2 years, 9 months ago in 9ff0a7e
CI github-actions:test 3 runs
Average
319 ms
median 304 ms
max 468 ms
Phases
Setup 0.87 ms Call 317 ms Teardown 0.28 ms
Categories
Database 128 ms Factories 2 ms App code 0.83 ms Other (DB schema, Libraries, Imports, pytest, ...) 188 ms

133 database queries per run

Needs 504 KB of memory (max 744 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 6 hours ago · open run
Show pytest frames
call466 ms99.7%
_post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()307 ms65.6%
_fixture_teardowndjango/test/testcases.py:1275307 ms65.6%
call_commanddjango/core/management/__init__.py:195307 ms65.6%
executedjango/core/management/base.py:460307 ms65.6%
handledjango/core/management/commands/flush.py:92229 ms48.9%
emit_post_migrate_signaldjango/core/management/sql.py:52229 ms48.9%
senddjango/dispatch/dispatcher.py:209229 ms48.9%
create_permissionsdjango/contrib/auth/management/__init__.py:61139 ms29.7%
create_contenttypesdjango/contrib/contenttypes/management/__init__.py:132136 ms29.1%
bulk_createdjango/db/models/query.py:833136 ms29.1%
_batched_insertdjango/db/models/query.py:1956136 ms29.1%
_insertdjango/db/models/query.py:1918136 ms29.1%
execute_sqldjango/db/models/sql/compiler.py:1925133 ms28.5%
executedjango/db/backends/utils.py:79133 ms28.5%
_execute_with_wrappersdjango/db/backends/utils.py:92133 ms28.5%
_executedjango/db/backends/utils.py:105133 ms28.5%
executepsycopg/cursor.py:114133 ms28.5%
waitpsycopg/connection.py:483133 ms28.5%
execute_sqldjango/db/models/sql/compiler.py:19243 ms0.6%
as_sqldjango/db/models/sql/compiler.py:18063 ms0.6%
create_contenttypesdjango/contrib/contenttypes/management/__init__.py:1253 ms0.6%
__iter__django/db/models/query.py:3903 ms0.6%
_fetch_alldjango/db/models/query.py:20003 ms0.6%
__iter__django/db/models/query.py:2773 ms0.6%
results_iterdjango/db/models/sql/compiler.py:15733 ms0.6%
execute_sqldjango/db/models/sql/compiler.py:16243 ms0.6%
executedjango/db/backends/utils.py:793 ms0.6%
_execute_with_wrappersdjango/db/backends/utils.py:923 ms0.6%
_executedjango/db/backends/utils.py:1053 ms0.6%
executepsycopg/cursor.py:1143 ms0.6%
waitpsycopg/connection.py:4833 ms0.6%
create_permissionsdjango/contrib/auth/management/__init__.py:10769 ms14.9%
bulk_createdjango/db/models/query.py:83369 ms14.9%
_batched_insertdjango/db/models/query.py:195669 ms14.9%
_insertdjango/db/models/query.py:191869 ms14.9%
execute_sqldjango/db/models/sql/compiler.py:192567 ms14.2%
executedjango/db/backends/utils.py:7967 ms14.2%
_execute_with_wrappersdjango/db/backends/utils.py:9267 ms14.2%
_executedjango/db/backends/utils.py:10567 ms14.2%
executepsycopg/cursor.py:11467 ms14.2%
waitpsycopg/connection.py:48367 ms14.2%
execute_sqldjango/db/models/sql/compiler.py:19243 ms0.6%
as_sqldjango/db/models/sql/compiler.py:18693 ms0.6%
assemble_as_sqldjango/db/backends/postgresql/compiler.py:563 ms0.6%
create_permissionsdjango/contrib/auth/management/__init__.py:809 ms1.9%
get_for_modelsdjango/contrib/contenttypes/models.py:916 ms1.2%
__iter__django/db/models/query.py:3906 ms1.2%
_fetch_alldjango/db/models/query.py:20006 ms1.2%
__iter__django/db/models/query.py:956 ms1.2%
execute_sqldjango/db/models/sql/compiler.py:16246 ms1.2%
executedjango/db/backends/utils.py:796 ms1.2%
_execute_with_wrappersdjango/db/backends/utils.py:926 ms1.2%
_executedjango/db/backends/utils.py:1056 ms1.2%
executepsycopg/cursor.py:1146 ms1.2%
waitpsycopg/connection.py:4836 ms1.2%
_execute_genpsycopg/_cursor_base.py:2063 ms0.6%
_maybe_prepare_genpsycopg/_cursor_base.py:2863 ms0.6%
_execute_sendpsycopg/client_cursor.py:783 ms0.6%
get_for_modelsdjango/contrib/contenttypes/models.py:903 ms0.6%
manager_methoddjango/db/models/manager.py:873 ms0.6%
get_querysetdjango/db/models/manager.py:1553 ms0.6%
create_permissionsdjango/contrib/auth/management/__init__.py:926 ms1.2%
__iter__django/db/models/query.py:3906 ms1.2%
_fetch_alldjango/db/models/query.py:20006 ms1.2%
__iter__django/db/models/query.py:2386 ms1.2%
results_iterdjango/db/models/sql/compiler.py:15736 ms1.2%
execute_sqldjango/db/models/sql/compiler.py:16246 ms1.2%
executedjango/db/backends/utils.py:796 ms1.2%
_execute_with_wrappersdjango/db/backends/utils.py:926 ms1.2%
_executedjango/db/backends/utils.py:1053 ms0.6%
executepsycopg/cursor.py:1143 ms0.6%
waitpsycopg/connection.py:4833 ms0.6%
_execute_genpsycopg/_cursor_base.py:2063 ms0.6%
_maybe_prepare_genpsycopg/_cursor_base.py:2863 ms0.6%
_execute_sendpsycopg/client_cursor.py:783 ms0.6%
create_contenttypesdjango/contrib/contenttypes/management/__init__.py:1253 ms0.6%
__iter__django/db/models/query.py:3903 ms0.6%
_fetch_alldjango/db/models/query.py:20003 ms0.6%
__iter__django/db/models/query.py:2773 ms0.6%
results_iterdjango/db/models/sql/compiler.py:15733 ms0.6%
execute_sqldjango/db/models/sql/compiler.py:16243 ms0.6%
executedjango/db/backends/utils.py:793 ms0.6%
_execute_with_wrappersdjango/db/backends/utils.py:923 ms0.6%
_executedjango/db/backends/utils.py:1053 ms0.6%
executepsycopg/cursor.py:1143 ms0.6%
waitpsycopg/connection.py:4833 ms0.6%
_execute_genpsycopg/_cursor_base.py:2063 ms0.6%
_maybe_prepare_genpsycopg/_cursor_base.py:2863 ms0.6%
_execute_sendpsycopg/client_cursor.py:783 ms0.6%
create_permissionsdjango/contrib/auth/management/__init__.py:883 ms0.6%
get_for_modelsdjango/contrib/contenttypes/models.py:953 ms0.6%
__iter__django/db/models/query.py:3903 ms0.6%
_fetch_alldjango/db/models/query.py:20003 ms0.6%
__iter__django/db/models/query.py:953 ms0.6%
execute_sqldjango/db/models/sql/compiler.py:16243 ms0.6%
executedjango/db/backends/utils.py:793 ms0.6%
_execute_with_wrappersdjango/db/backends/utils.py:923 ms0.6%
_executedjango/db/backends/utils.py:1053 ms0.6%
executepsycopg/cursor.py:1143 ms0.6%
waitpsycopg/connection.py:4833 ms0.6%
_execute_genpsycopg/_cursor_base.py:2063 ms0.6%
_maybe_prepare_genpsycopg/_cursor_base.py:2863 ms0.6%
_execute_sendpsycopg/client_cursor.py:783 ms0.6%
handledjango/core/management/commands/flush.py:7475 ms16.1%
execute_sql_flushdjango/db/backends/base/operations.py:46864 ms13.6%
executedjango/db/backends/utils.py:7964 ms13.6%
_execute_with_wrappersdjango/db/backends/utils.py:9264 ms13.6%
_executedjango/db/backends/utils.py:10364 ms13.6%
executepsycopg/cursor.py:11464 ms13.6%
waitpsycopg/connection.py:48364 ms13.6%
execute_sql_flushdjango/db/backends/base/operations.py:4629 ms1.9%
__exit__django/db/transaction.py:2639 ms1.9%
innerdjango/utils/asyncio.py:269 ms1.9%
commitdjango/db/backends/base/base.py:3279 ms1.9%
_commitdjango/db/backends/base/base.py:3039 ms1.9%
commitpsycopg/connection.py:3049 ms1.9%
waitpsycopg/connection.py:4839 ms1.9%
handledjango/core/management/commands/flush.py:523 ms0.6%
sql_flushdjango/core/management/sql.py:113 ms0.6%
django_table_namesdjango/db/backends/base/introspection.py:1133 ms0.6%
table_namesdjango/db/backends/base/introspection.py:603 ms0.6%
get_namesdjango/db/backends/base/introspection.py:543 ms0.6%
get_table_listdjango/db/backends/postgresql/introspection.py:593 ms0.6%
executedjango/db/backends/utils.py:793 ms0.6%
_execute_with_wrappersdjango/db/backends/utils.py:923 ms0.6%
_executedjango/db/backends/utils.py:1033 ms0.6%
executepsycopg/cursor.py:1143 ms0.6%
waitpsycopg/connection.py:4833 ms0.6%
test_ingest_end_after_progressapps/api/tests.py:246 self.join_workers()64 ms13.6%
join_workersapps/api/tests.py:76 drain(current_app(), raise_on_failure=True)64 ms13.6%
drainpotatoq/testing.py:7355 ms11.8%
executepotatoq/worker/executor.py:28855 ms11.8%
_executepotatoq/worker/executor.py:36849 ms10.5%
__call__potatoq/task.py:19249 ms10.5%
warm_reportsapps/api/tasks.py:266 flaky_report(Project.objects.get(pk=project_id), DEFAULT_DAYS)12 ms2.5%
manager_methoddjango/db/models/manager.py:8712 ms2.5%
getdjango/db/models/query.py:63512 ms2.5%
__len__django/db/models/query.py:37212 ms2.5%
_fetch_alldjango/db/models/query.py:200012 ms2.5%
__iter__django/db/models/query.py:9512 ms2.5%
execute_sqldjango/db/models/sql/compiler.py:162212 ms2.5%
innerdjango/utils/asyncio.py:2612 ms2.5%
cursordjango/db/backends/base/base.py:32012 ms2.5%
_cursordjango/db/backends/base/base.py:29612 ms2.5%
patched_ensure_connectiondjango/test/testcases.py:30312 ms2.5%
innerdjango/utils/asyncio.py:2612 ms2.5%
ensure_connectiondjango/db/backends/base/base.py:27912 ms2.5%
innerdjango/utils/asyncio.py:2612 ms2.5%
connectdjango/db/backends/base/base.py:25612 ms2.5%
innerdjango/utils/asyncio.py:2612 ms2.5%
get_new_connectiondjango/db/backends/postgresql/base.py:33312 ms2.5%
connectpsycopg/connection.py:10912 ms2.5%
wait_connpsycopg/waiting.py:1129 ms1.9%
select<stdlib>/selectors.py:4529 ms1.9%
wait_connpsycopg/waiting.py:1183 ms0.6%
_connect_genpsycopg/_connection_base.py:4413 ms0.6%
__enter__django/db/transaction.py:19812 ms2.5%
get_autocommitdjango/db/backends/base/base.py:45412 ms2.5%
patched_ensure_connectiondjango/test/testcases.py:30312 ms2.5%
innerdjango/utils/asyncio.py:2612 ms2.5%
ensure_connectiondjango/db/backends/base/base.py:27912 ms2.5%
innerdjango/utils/asyncio.py:2612 ms2.5%
connectdjango/db/backends/base/base.py:2569 ms1.9%
innerdjango/utils/asyncio.py:269 ms1.9%
get_new_connectiondjango/db/backends/postgresql/base.py:3339 ms1.9%
connectpsycopg/connection.py:1099 ms1.9%
wait_connpsycopg/waiting.py:1186 ms1.2%
_connect_genpsycopg/_connection_base.py:4416 ms1.2%
wait_connpsycopg/waiting.py:1123 ms0.6%
select<stdlib>/selectors.py:4523 ms0.6%
connectdjango/db/backends/base/base.py:2583 ms0.6%
init_connection_statedjango/db/backends/postgresql/base.py:4023 ms0.6%
_configure_connectiondjango/db/backends/postgresql/base.py:3743 ms0.6%
_configure_timezonedjango/db/backends/postgresql/base.py:3573 ms0.6%
executepsycopg/cursor.py:1143 ms0.6%
waitpsycopg/connection.py:4833 ms0.6%
process_ingest_endapps/api/tasks.py:206 ingest = Ingest.objects.select_for_update().get(id=ingest_id)6 ms1.2%
getdjango/db/models/query.py:6356 ms1.2%
__len__django/db/models/query.py:3726 ms1.2%
_fetch_alldjango/db/models/query.py:20006 ms1.2%
__iter__django/db/models/query.py:956 ms1.2%
execute_sqldjango/db/models/sql/compiler.py:16246 ms1.2%
executedjango/db/backends/utils.py:796 ms1.2%
_execute_with_wrappersdjango/db/backends/utils.py:926 ms1.2%
_executedjango/db/backends/utils.py:1056 ms1.2%
executepsycopg/cursor.py:1146 ms1.2%
waitpsycopg/connection.py:4836 ms1.2%
__exit__django/db/transaction.py:2636 ms1.2%
innerdjango/utils/asyncio.py:266 ms1.2%
commitdjango/db/backends/base/base.py:3276 ms1.2%
_commitdjango/db/backends/base/base.py:3036 ms1.2%
commitpsycopg/connection.py:3046 ms1.2%
waitpsycopg/connection.py:4836 ms1.2%
process_ingest_endapps/api/tasks.py:229 ingest.save()3 ms0.6%
savedjango/db/models/base.py:8743 ms0.6%
save_basedjango/db/models/base.py:9423 ms0.6%
process_ingest_progressapps/api/tasks.py:1213 ms0.6%
upsertapps/projects/models.py:230 self.bulk_create( # sorted, so uploads sharing tests lock their rows in the same order3 ms0.6%
manager_methoddjango/db/models/manager.py:873 ms0.6%
bulk_createdjango/db/models/query.py:8333 ms0.6%
_batched_insertdjango/db/models/query.py:19563 ms0.6%
_insertdjango/db/models/query.py:19183 ms0.6%
execute_sqldjango/db/models/sql/compiler.py:19253 ms0.6%
as_sqldjango/db/models/sql/compiler.py:18983 ms0.6%
assemble_as_sqldjango/db/backends/postgresql/compiler.py:643 ms0.6%
get_db_prep_valuedjango/db/models/fields/__init__.py:10043 ms0.6%
get_prep_valuedjango/db/models/fields/__init__.py:16623 ms0.6%
process_ingest_progressapps/api/tasks.py:165 TestRun.objects.bulk_create(3 ms0.6%
manager_methoddjango/db/models/manager.py:873 ms0.6%
bulk_createdjango/db/models/query.py:8333 ms0.6%
_batched_insertdjango/db/models/query.py:19563 ms0.6%
_insertdjango/db/models/query.py:19183 ms0.6%
execute_sqldjango/db/models/sql/compiler.py:19253 ms0.6%
executedjango/db/backends/utils.py:793 ms0.6%
_execute_with_wrappersdjango/db/backends/utils.py:923 ms0.6%
_executedjango/db/backends/utils.py:1053 ms0.6%
executepsycopg/cursor.py:1143 ms0.6%
waitpsycopg/connection.py:4833 ms0.6%
process_ingest_endapps/api/tasks.py:210 session = Session.objects.get(project=ingest.project, ingest_id=parent_ingest_id)3 ms0.6%
manager_methoddjango/db/models/manager.py:873 ms0.6%
getdjango/db/models/query.py:6353 ms0.6%
order_bydjango/db/models/query.py:17703 ms0.6%
_filter_or_excludedjango/db/models/query.py:15603 ms0.6%
_filter_or_exclude_inplacedjango/db/models/query.py:15703 ms0.6%
add_qdjango/db/models/sql/query.py:16713 ms0.6%
_add_qdjango/db/models/sql/query.py:17033 ms0.6%
build_filterdjango/db/models/sql/query.py:16133 ms0.6%
trim_joinsdjango/db/models/sql/query.py:20223 ms0.6%
process_ingest_endapps/api/tasks.py:2143 ms0.6%
savedjango/db/models/base.py:8743 ms0.6%
save_basedjango/db/models/base.py:9723 ms0.6%
_save_tabledjango/db/models/base.py:10573 ms0.6%
_executepotatoq/worker/executor.py:4106 ms1.2%
sendpotatoq/signals.py:1196 ms1.2%
_close_old_connectionspotatoq/contrib/django/__init__.py:2726 ms1.2%
close_old_connectionsdjango/db/__init__.py:596 ms1.2%
close_if_unusable_or_obsoletedjango/db/backends/base/base.py:6156 ms1.2%
innerdjango/utils/asyncio.py:266 ms1.2%
closedjango/db/backends/base/base.py:3556 ms1.2%
_closedjango/db/backends/postgresql/base.py:3966 ms1.2%
closepsycopg/connection.py:1966 ms1.2%
drainpotatoq/testing.py:673 ms0.6%
fetchpotatoq/brokers/memory.py:2293 ms0.6%
_claimpotatoq/brokers/memory.py:2093 ms0.6%
promotepotatoq/brokers/memory.py:833 ms0.6%
__enter__<stdlib>/threading.py:3143 ms0.6%
drainpotatoq/testing.py:743 ms0.6%
executepotatoq/worker/executor.py:2883 ms0.6%
_executepotatoq/worker/executor.py:4103 ms0.6%
sendpotatoq/signals.py:1193 ms0.6%
_close_old_connectionspotatoq/contrib/django/__init__.py:2723 ms0.6%
close_old_connectionsdjango/db/__init__.py:593 ms0.6%
close_if_unusable_or_obsoletedjango/db/backends/base/base.py:6153 ms0.6%
innerdjango/utils/asyncio.py:263 ms0.6%
closedjango/db/backends/base/base.py:3553 ms0.6%
_closedjango/db/backends/postgresql/base.py:3963 ms0.6%
closepsycopg/connection.py:1963 ms0.6%
drainpotatoq/testing.py:603 ms0.6%
loader_import_default_modulespotatoq/app.py:3533 ms0.6%
_import_includespotatoq/app.py:3483 ms0.6%
_do_autodiscoverpotatoq/app.py:3823 ms0.6%
import_module<stdlib>/importlib/__init__.py:883 ms0.6%
_gcd_import<frozen importlib._bootstrap>:14063 ms0.6%
_find_and_load<frozen importlib._bootstrap>:13713 ms0.6%
_find_and_load_unlocked<frozen importlib._bootstrap>:13333 ms0.6%
_find_spec<frozen importlib._bootstrap>:12673 ms0.6%
find_spec<frozen importlib._bootstrap_external>:12963 ms0.6%
_get_spec<frozen importlib._bootstrap_external>:12703 ms0.6%
test_ingest_end_after_progressapps/api/tests.py:23935 ms7.4%
ingest_startapps/api/tests.py:98 return self.client.post(35 ms7.4%
postdjango/test/client.py:115335 ms7.4%
postdjango/test/client.py:49935 ms7.4%
genericdjango/test/client.py:67135 ms7.4%
requestdjango/test/client.py:108235 ms7.4%
__call__django/test/client.py:17329 ms6.2%
load_middlewaredjango/core/handlers/base.py:6229 ms6.2%
__init__whitenoise/middleware.py:10429 ms6.2%
add_fileswhitenoise/base.py:10829 ms6.2%
update_files_dictionarywhitenoise/base.py:12020 ms4.3%
add_file_to_dictionarywhitenoise/base.py:13120 ms4.3%
get_static_filewhitenoise/base.py:20814 ms3.1%
__init__whitenoise/responders.py:773 ms0.6%
__getitem__<stdlib>/wsgiref/headers.py:833 ms0.6%
parsedate<stdlib>/email/_parseaddr.py:1853 ms0.6%
__init__whitenoise/responders.py:763 ms0.6%
get_headerswhitenoise/responders.py:1813 ms0.6%
formatdate<stdlib>/email/utils.py:2663 ms0.6%
add_cache_headerswhitenoise/base.py:2273 ms0.6%
add_mime_headerswhitenoise/base.py:2213 ms0.6%
get_alternativeswhitenoise/responders.py:2003 ms0.6%
__setitem__<stdlib>/wsgiref/headers.py:623 ms0.6%
format_datetime<stdlib>/email/utils.py:2843 ms0.6%
__init__whitenoise/responders.py:733 ms0.6%
get_file_statswhitenoise/responders.py:1573 ms0.6%
get_static_filewhitenoise/base.py:2026 ms1.2%
update_files_dictionarywhitenoise/base.py:1159 ms1.9%
scantreewhitenoise/base.py:2629 ms1.9%
scantreewhitenoise/base.py:2629 ms1.9%
scantreewhitenoise/base.py:2623 ms0.6%
scantreewhitenoise/base.py:2623 ms0.6%
scantreewhitenoise/base.py:2623 ms0.6%
scantreewhitenoise/base.py:2643 ms0.6%
scantreewhitenoise/base.py:2603 ms0.6%
scantreewhitenoise/base.py:2643 ms0.6%
__call__django/test/client.py:1866 ms1.2%
get_responsedjango/core/handlers/base.py:1416 ms1.2%
innerdjango/core/handlers/exception.py:556 ms1.2%
__call__debug_toolbar/middleware.py:1306 ms1.2%
innerdjango/core/handlers/exception.py:556 ms1.2%
__call__django/utils/deprecation.py:3096 ms1.2%
innerdjango/core/handlers/exception.py:556 ms1.2%
__call__whitenoise/middleware.py:1236 ms1.2%
innerdjango/core/handlers/exception.py:556 ms1.2%
__call__django/utils/deprecation.py:3096 ms1.2%
innerdjango/core/handlers/exception.py:556 ms1.2%
__call__django/utils/deprecation.py:3096 ms1.2%
innerdjango/core/handlers/exception.py:556 ms1.2%
__call__django/utils/deprecation.py:3096 ms1.2%
innerdjango/core/handlers/exception.py:556 ms1.2%
__call__django/utils/deprecation.py:3096 ms1.2%
innerdjango/core/handlers/exception.py:556 ms1.2%
__call__django/utils/deprecation.py:3096 ms1.2%
innerdjango/core/handlers/exception.py:556 ms1.2%
__call__django/utils/deprecation.py:3096 ms1.2%
innerdjango/core/handlers/exception.py:556 ms1.2%
middlewareallauth/account/middleware.py:346 ms1.2%
innerdjango/core/handlers/exception.py:556 ms1.2%
_get_responsedjango/core/handlers/base.py:1986 ms1.2%
_view_wrapperdjango/views/decorators/csrf.py:656 ms1.2%
wrapped_viewapps/api/urls.py:376 ms1.2%
innerdjango/views/decorators/http.py:646 ms1.2%
wrapped_viewapps/api/urls.py:753 ms0.6%
ingest_startapps/api/urls.py:100 process_ingest_start(ingest.id)3 ms0.6%
__call__potatoq/app.py:7633 ms0.6%
__call__potatoq/task.py:1893 ms0.6%
process_ingest_startapps/api/tasks.py:773 ms0.6%
get_or_create_numberedapps/projects/models.py:213 ms0.6%
next_numberapps/projects/models.py:35 return (model.objects.filter(project_id=project_id).aggregate(last=models.Max("number"))["last"] or 0) + 13 ms0.6%
manager_methoddjango/db/models/manager.py:873 ms0.6%
filterdjango/db/models/query.py:15423 ms0.6%
_filter_or_excludedjango/db/models/query.py:15603 ms0.6%
_filter_or_exclude_inplacedjango/db/models/query.py:15703 ms0.6%
add_qdjango/db/models/sql/query.py:16713 ms0.6%
_add_qdjango/db/models/sql/query.py:17033 ms0.6%
build_filterdjango/db/models/sql/query.py:15773 ms0.6%
setup_joinsdjango/db/models/sql/query.py:19773 ms0.6%
__init__django/db/models/sql/datastructures.py:663 ms0.6%
<genexpr>django/db/models/sql/datastructures.py:673 ms0.6%
wrapped_viewapps/api/urls.py:72 project = get_object_or_404(Project, secrettokens__token=request.headers.get("Authorization"))3 ms0.6%
get_object_or_404django/shortcuts.py:903 ms0.6%
getdjango/db/models/query.py:6353 ms0.6%
__len__django/db/models/query.py:3723 ms0.6%
_fetch_alldjango/db/models/query.py:20003 ms0.6%
__iter__django/db/models/query.py:953 ms0.6%
execute_sqldjango/db/models/sql/compiler.py:16243 ms0.6%
executedjango/db/backends/utils.py:793 ms0.6%
_execute_with_wrappersdjango/db/backends/utils.py:923 ms0.6%
_executedjango/db/backends/utils.py:1053 ms0.6%
executepsycopg/cursor.py:1143 ms0.6%
waitpsycopg/connection.py:4833 ms0.6%
setUpapps/api/tests.py:73 self.project = baker.make("projects.Project", secrettokens_set__token=self.secret_token)23 ms5.0%
makemodel_bakery/baker.py:14723 ms5.0%
makemodel_bakery/baker.py:40623 ms5.0%
_makemodel_bakery/baker.py:47223 ms5.0%
generate_valuemodel_bakery/baker.py:80023 ms5.0%
gen_relatedmodel_bakery/random_gen.py:27423 ms5.0%
makemodel_bakery/baker.py:14723 ms5.0%
makemodel_bakery/baker.py:40623 ms5.0%
_makemodel_bakery/baker.py:48223 ms5.0%
instancemodel_bakery/baker.py:53523 ms5.0%
savedjango/db/models/base.py:87423 ms5.0%
save_basedjango/db/models/base.py:97223 ms5.0%
_save_tabledjango/db/models/base.py:116823 ms5.0%
_do_insertdjango/db/models/base.py:121823 ms5.0%
manager_methoddjango/db/models/manager.py:8723 ms5.0%
_insertdjango/db/models/query.py:191823 ms5.0%
execute_sqldjango/db/models/sql/compiler.py:192320 ms4.3%
innerdjango/utils/asyncio.py:2620 ms4.3%
cursordjango/db/backends/base/base.py:32020 ms4.3%
_cursordjango/db/backends/base/base.py:29620 ms4.3%
patched_ensure_connectiondjango/test/testcases.py:30320 ms4.3%
innerdjango/utils/asyncio.py:2620 ms4.3%
ensure_connectiondjango/db/backends/base/base.py:27920 ms4.3%
innerdjango/utils/asyncio.py:2620 ms4.3%
connectdjango/db/backends/base/base.py:25620 ms4.3%
innerdjango/utils/asyncio.py:2620 ms4.3%
get_new_connectiondjango/db/backends/postgresql/base.py:33320 ms4.3%
connectpsycopg/connection.py:10920 ms4.3%
wait_connpsycopg/waiting.py:11814 ms3.1%
_connect_genpsycopg/_connection_base.py:44114 ms3.1%
wait_connpsycopg/waiting.py:1123 ms0.6%
select<stdlib>/selectors.py:4523 ms0.6%
wait_connpsycopg/waiting.py:1073 ms0.6%
execute_sqldjango/db/models/sql/compiler.py:19253 ms0.6%
executedjango/db/backends/utils.py:793 ms0.6%
_execute_with_wrappersdjango/db/backends/utils.py:923 ms0.6%
_executedjango/db/backends/utils.py:1053 ms0.6%
executepsycopg/cursor.py:1143 ms0.6%
waitpsycopg/connection.py:4833 ms0.6%
_execute_genpsycopg/_cursor_base.py:2063 ms0.6%
_maybe_prepare_genpsycopg/_cursor_base.py:2863 ms0.6%
_execute_sendpsycopg/client_cursor.py:783 ms0.6%
test_ingest_end_after_progressapps/api/tests.py:25514 ms3.1%
join_workersapps/api/tests.py:76 drain(current_app(), raise_on_failure=True)14 ms3.1%
drainpotatoq/testing.py:7314 ms3.1%
executepotatoq/worker/executor.py:28814 ms3.1%
_executepotatoq/worker/executor.py:36814 ms3.1%
__call__potatoq/task.py:19214 ms3.1%
process_ingest_progressapps/api/tasks.py:165 TestRun.objects.bulk_create(3 ms0.6%
manager_methoddjango/db/models/manager.py:873 ms0.6%
bulk_createdjango/db/models/query.py:8333 ms0.6%
_batched_insertdjango/db/models/query.py:19563 ms0.6%
_insertdjango/db/models/query.py:19183 ms0.6%
execute_sqldjango/db/models/sql/compiler.py:19253 ms0.6%
executedjango/db/backends/utils.py:793 ms0.6%
_execute_with_wrappersdjango/db/backends/utils.py:923 ms0.6%
_executedjango/db/backends/utils.py:1053 ms0.6%
executepsycopg/cursor.py:1143 ms0.6%
waitpsycopg/connection.py:4833 ms0.6%
process_ingest_progressapps/api/tasks.py:1853 ms0.6%
update_session_countsapps/api/tasks.py:198 Session.objects.filter(pk=session.pk).update(3 ms0.6%
manager_methoddjango/db/models/manager.py:873 ms0.6%
process_ingest_progressapps/api/tasks.py:119 commit = session.run.commit3 ms0.6%
__get__django/db/models/fields/related_descriptors.py:2573 ms0.6%
get_objectdjango/db/models/fields/related_descriptors.py:2223 ms0.6%
getdjango/db/models/query.py:6353 ms0.6%
__len__django/db/models/query.py:3723 ms0.6%
_fetch_alldjango/db/models/query.py:20003 ms0.6%
__iter__django/db/models/query.py:953 ms0.6%
execute_sqldjango/db/models/sql/compiler.py:16243 ms0.6%
executedjango/db/backends/utils.py:793 ms0.6%
_execute_with_wrappersdjango/db/backends/utils.py:923 ms0.6%
_executedjango/db/backends/utils.py:1053 ms0.6%
executepsycopg/cursor.py:1143 ms0.6%
waitpsycopg/connection.py:4833 ms0.6%
process_ingest_progressapps/api/tasks.py:118 session = Session.objects.get(project=ingest.project, ingest_id=parent_ingest_id)3 ms0.6%
manager_methoddjango/db/models/manager.py:873 ms0.6%
getdjango/db/models/query.py:6353 ms0.6%
__len__django/db/models/query.py:3723 ms0.6%
_fetch_alldjango/db/models/query.py:20003 ms0.6%
__iter__django/db/models/query.py:953 ms0.6%
execute_sqldjango/db/models/sql/compiler.py:16243 ms0.6%
executedjango/db/backends/utils.py:793 ms0.6%
_execute_with_wrappersdjango/db/backends/utils.py:923 ms0.6%
_executedjango/db/backends/utils.py:1053 ms0.6%
executepsycopg/cursor.py:1143 ms0.6%
waitpsycopg/connection.py:4833 ms0.6%
process_ingest_progressapps/api/tasks.py:1213 ms0.6%
upsertapps/projects/models.py:230 self.bulk_create( # sorted, so uploads sharing tests lock their rows in the same order3 ms0.6%
manager_methoddjango/db/models/manager.py:873 ms0.6%
bulk_createdjango/db/models/query.py:8333 ms0.6%
_batched_insertdjango/db/models/query.py:19563 ms0.6%
_insertdjango/db/models/query.py:19183 ms0.6%
execute_sqldjango/db/models/sql/compiler.py:19253 ms0.6%
executedjango/db/backends/utils.py:793 ms0.6%
_execute_with_wrappersdjango/db/backends/utils.py:923 ms0.6%
_executedjango/db/backends/utils.py:1053 ms0.6%
executepsycopg/cursor.py:1143 ms0.6%
waitpsycopg/connection.py:4833 ms0.6%
test_ingest_end_after_progressapps/api/tests.py:24912 ms2.5%
ingest_progressapps/api/tests.py:10612 ms2.5%
postdjango/test/client.py:115312 ms2.5%
postdjango/test/client.py:49912 ms2.5%
genericdjango/test/client.py:67112 ms2.5%
requestdjango/test/client.py:108212 ms2.5%
__call__django/test/client.py:18612 ms2.5%
get_responsedjango/core/handlers/base.py:14112 ms2.5%
innerdjango/core/handlers/exception.py:5512 ms2.5%
__call__debug_toolbar/middleware.py:13012 ms2.5%
innerdjango/core/handlers/exception.py:5512 ms2.5%
__call__django/utils/deprecation.py:30912 ms2.5%
innerdjango/core/handlers/exception.py:5512 ms2.5%
__call__whitenoise/middleware.py:12312 ms2.5%
innerdjango/core/handlers/exception.py:5512 ms2.5%
__call__django/utils/deprecation.py:30912 ms2.5%
innerdjango/core/handlers/exception.py:5512 ms2.5%
__call__django/utils/deprecation.py:30912 ms2.5%
innerdjango/core/handlers/exception.py:5512 ms2.5%
__call__django/utils/deprecation.py:30912 ms2.5%
innerdjango/core/handlers/exception.py:5512 ms2.5%
__call__django/utils/deprecation.py:30912 ms2.5%
innerdjango/core/handlers/exception.py:5512 ms2.5%
__call__django/utils/deprecation.py:30912 ms2.5%
innerdjango/core/handlers/exception.py:5512 ms2.5%
__call__django/utils/deprecation.py:30912 ms2.5%
innerdjango/core/handlers/exception.py:5512 ms2.5%
middlewareallauth/account/middleware.py:3412 ms2.5%
innerdjango/core/handlers/exception.py:5512 ms2.5%
_get_responsedjango/core/handlers/base.py:19812 ms2.5%
_view_wrapperdjango/views/decorators/csrf.py:6512 ms2.5%
wrapped_viewapps/api/urls.py:3712 ms2.5%
innerdjango/views/decorators/http.py:6412 ms2.5%
wrapped_viewapps/api/urls.py:72 project = get_object_or_404(Project, secrettokens__token=request.headers.get("Authorization"))9 ms1.9%
get_object_or_404django/shortcuts.py:909 ms1.9%
getdjango/db/models/query.py:6359 ms1.9%
__len__django/db/models/query.py:3729 ms1.9%
_fetch_alldjango/db/models/query.py:20009 ms1.9%
__iter__django/db/models/query.py:959 ms1.9%
execute_sqldjango/db/models/sql/compiler.py:16229 ms1.9%
innerdjango/utils/asyncio.py:269 ms1.9%
cursordjango/db/backends/base/base.py:3209 ms1.9%
_cursordjango/db/backends/base/base.py:2969 ms1.9%
patched_ensure_connectiondjango/test/testcases.py:3039 ms1.9%
innerdjango/utils/asyncio.py:269 ms1.9%
ensure_connectiondjango/db/backends/base/base.py:2799 ms1.9%
innerdjango/utils/asyncio.py:269 ms1.9%
connectdjango/db/backends/base/base.py:2569 ms1.9%
innerdjango/utils/asyncio.py:269 ms1.9%
get_new_connectiondjango/db/backends/postgresql/base.py:3339 ms1.9%
connectpsycopg/connection.py:1099 ms1.9%
wait_connpsycopg/waiting.py:1126 ms1.2%
select<stdlib>/selectors.py:4526 ms1.2%
wait_connpsycopg/waiting.py:1183 ms0.6%
_connect_genpsycopg/_connection_base.py:4413 ms0.6%
wrapped_viewapps/api/urls.py:73 touch_token(request.headers.get("Authorization"))3 ms0.6%
touch_tokenapps/api/urls.py:59 SecretTokens.objects.filter(pk__in=list(stale)).update(date_last_used=now)3 ms0.6%
__iter__django/db/models/query.py:3903 ms0.6%
_fetch_alldjango/db/models/query.py:20003 ms0.6%
__iter__django/db/models/query.py:2773 ms0.6%
results_iterdjango/db/models/sql/compiler.py:15733 ms0.6%
execute_sqldjango/db/models/sql/compiler.py:16243 ms0.6%
executedjango/db/backends/utils.py:793 ms0.6%
_execute_with_wrappersdjango/db/backends/utils.py:923 ms0.6%
_executedjango/db/backends/utils.py:1053 ms0.6%
executepsycopg/cursor.py:1143 ms0.6%
waitpsycopg/connection.py:4833 ms0.6%
test_ingest_end_after_progressapps/api/tests.py:257 run = Run.objects.filter(project=self.project).get()9 ms1.9%
getdjango/db/models/query.py:6359 ms1.9%
__len__django/db/models/query.py:3729 ms1.9%
_fetch_alldjango/db/models/query.py:20009 ms1.9%
__iter__django/db/models/query.py:959 ms1.9%
execute_sqldjango/db/models/sql/compiler.py:16226 ms1.2%
innerdjango/utils/asyncio.py:266 ms1.2%
cursordjango/db/backends/base/base.py:3206 ms1.2%
_cursordjango/db/backends/base/base.py:2966 ms1.2%
patched_ensure_connectiondjango/test/testcases.py:3036 ms1.2%
innerdjango/utils/asyncio.py:266 ms1.2%
ensure_connectiondjango/db/backends/base/base.py:2796 ms1.2%
innerdjango/utils/asyncio.py:266 ms1.2%
connectdjango/db/backends/base/base.py:2563 ms0.6%
innerdjango/utils/asyncio.py:263 ms0.6%
get_new_connectiondjango/db/backends/postgresql/base.py:3333 ms0.6%
connectpsycopg/connection.py:1093 ms0.6%
wait_connpsycopg/waiting.py:1183 ms0.6%
_connect_genpsycopg/_connection_base.py:4413 ms0.6%
connectdjango/db/backends/base/base.py:2583 ms0.6%
init_connection_statedjango/db/backends/postgresql/base.py:4023 ms0.6%
_configure_connectiondjango/db/backends/postgresql/base.py:3743 ms0.6%
_configure_timezonedjango/db/backends/postgresql/base.py:3573 ms0.6%
executepsycopg/cursor.py:1143 ms0.6%
waitpsycopg/connection.py:4833 ms0.6%
execute_sqldjango/db/models/sql/compiler.py:16243 ms0.6%
executedjango/db/backends/utils.py:793 ms0.6%
_execute_with_wrappersdjango/db/backends/utils.py:923 ms0.6%
_executedjango/db/backends/utils.py:1053 ms0.6%
executepsycopg/cursor.py:1143 ms0.6%
waitpsycopg/connection.py:4833 ms0.6%
test_ingest_end_after_progressapps/api/tests.py:2443 ms0.6%
ingest_endapps/api/tests.py:1143 ms0.6%
postdjango/test/client.py:11533 ms0.6%
postdjango/test/client.py:4993 ms0.6%
genericdjango/test/client.py:6713 ms0.6%
requestdjango/test/client.py:10823 ms0.6%
__call__django/test/client.py:1863 ms0.6%
get_responsedjango/core/handlers/base.py:1413 ms0.6%
innerdjango/core/handlers/exception.py:553 ms0.6%
__call__debug_toolbar/middleware.py:1303 ms0.6%
innerdjango/core/handlers/exception.py:553 ms0.6%
__call__django/utils/deprecation.py:3093 ms0.6%
innerdjango/core/handlers/exception.py:553 ms0.6%
__call__whitenoise/middleware.py:1233 ms0.6%
innerdjango/core/handlers/exception.py:553 ms0.6%
__call__django/utils/deprecation.py:3093 ms0.6%
innerdjango/core/handlers/exception.py:553 ms0.6%
__call__django/utils/deprecation.py:3093 ms0.6%
innerdjango/core/handlers/exception.py:553 ms0.6%
__call__django/utils/deprecation.py:3093 ms0.6%
innerdjango/core/handlers/exception.py:553 ms0.6%
__call__django/utils/deprecation.py:3093 ms0.6%
innerdjango/core/handlers/exception.py:553 ms0.6%
__call__django/utils/deprecation.py:3093 ms0.6%
innerdjango/core/handlers/exception.py:553 ms0.6%
__call__django/utils/deprecation.py:3093 ms0.6%
innerdjango/core/handlers/exception.py:553 ms0.6%
middlewareallauth/account/middleware.py:343 ms0.6%
innerdjango/core/handlers/exception.py:553 ms0.6%
_get_responsedjango/core/handlers/base.py:1983 ms0.6%
_view_wrapperdjango/views/decorators/csrf.py:653 ms0.6%
wrapped_viewapps/api/urls.py:373 ms0.6%
innerdjango/views/decorators/http.py:643 ms0.6%
wrapped_viewapps/api/urls.py:72 project = get_object_or_404(Project, secrettokens__token=request.headers.get("Authorization"))3 ms0.6%
get_object_or_404django/shortcuts.py:903 ms0.6%
getdjango/db/models/query.py:6353 ms0.6%
__len__django/db/models/query.py:3723 ms0.6%
_fetch_alldjango/db/models/query.py:20003 ms0.6%
__iter__django/db/models/query.py:953 ms0.6%
execute_sqldjango/db/models/sql/compiler.py:16113 ms0.6%
as_sqldjango/db/models/sql/compiler.py:7923 ms0.6%
get_from_clausedjango/db/models/sql/compiler.py:11593 ms0.6%
compiledjango/db/models/sql/compiler.py:5783 ms0.6%
as_sqldjango/db/models/sql/datastructures.py:893 ms0.6%
prepare_join_on_clausedjango/db/backends/postgresql/operations.py:3993 ms0.6%
db_typedjango/db/models/fields/related.py:12233 ms0.6%
Estimated from 161 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)
join_workers · Database
32 ms
apps/api/tests.py:98
return self.client.post(
ingest_start · Libraries
29 ms
apps/api/tests.py:73
self.project = baker.make("projects.Project", secrettokens_set__token=self.secret_token)
setUp · Database
23 ms
apps/api/urls.py:72
project = get_object_or_404(Project, secrettokens__token=request.headers.get("Authorization"))
wrapped_view · Database
14 ms
apps/api/tasks.py:266
flaky_report(Project.objects.get(pk=project_id), DEFAULT_DAYS)
warm_reports · Database
12 ms
apps/api/tests.py:257
run = Run.objects.filter(project=self.project).get()
test_ingest_end_after_progress · Database
9 ms
apps/api/tasks.py:206
ingest = Ingest.objects.select_for_update().get(id=ingest_id)
process_ingest_end · Database
6 ms
apps/api/tasks.py:165
TestRun.objects.bulk_create(
process_ingest_progress · Database
6 ms
apps/projects/models.py:230
self.bulk_create( # sorted, so uploads sharing tests lock their rows in the same order
upsert · Database
6 ms
apps/api/tasks.py:229
ingest.save()
process_ingest_end · Database
3 ms

Fixtures

Exact setup time
_dj_autoclear_mailbox function 0.25 ms
_template_string_if_invalid_marker function 0.08 ms
_django_db_marker function 0.07 ms
_django_set_urlconf function 0.06 ms
_django_clear_site_cache function 0.05 ms
_live_server_helper function 0.05 ms
monkeypatch function 0.03 ms

Database

133 queries · 265 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 _post_teardown
django/test/testcases.py:1240
307 ms
call test body
apps/api/tests.py:246
136 ms
call setUp
apps/api/tests.py:73
23 ms

Reliability

3 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 50 results, oldest first in the strip
When Environment Outcome Duration Commit
6 hours ago CI github-actions:test passed 468 ms d2c12e5 main Profile
6 hours ago CI github-actions:test passed 184 ms 0b902f6 main Profile
7 hours ago CI github-actions:test passed 304 ms 78a4357 main Profile
2 years ago CI github-actions passed 494 ms 61209a6 main Run
2 years, 2 months ago CI github-actions passed 576 ms 55ca4c2 main Run
2 years, 3 months ago CI github-actions passed 1.66 s d007c85 main Run
2 years, 4 months ago CI github-actions passed 662 ms 3d86013 main Run
2 years, 4 months ago CI github-actions passed 630 ms bed0acb main Run
2 years, 4 months ago CI github-actions passed 719 ms 78c1737 main Run
2 years, 4 months ago CI github-actions passed 559 ms 1a5664b main Run
2 years, 5 months ago CI github-actions passed 644 ms c3680ac main Run
2 years, 5 months ago CI github-actions passed 587 ms 06a1df4 main Run
2 years, 5 months ago CI github-actions passed 612 ms a29c34e main Run
2 years, 5 months ago CI github-actions passed 542 ms e55e63f main Run
2 years, 5 months ago CI github-actions passed 1.73 s ba5cb67 main Run
2 years, 6 months ago CI github-actions passed 539 ms 7c123d8 main Run
2 years, 6 months ago CI github-actions passed 555 ms 5ae45e1 main Run
2 years, 6 months ago CI github-actions passed 608 ms 1680367 main Run
2 years, 6 months ago CI github-actions passed 612 ms da2b917 main Run
2 years, 6 months ago CI github-actions passed 566 ms d3313c0 main Run