Tests / apps/api/tests.py
IngestStartEndpointTest::test_ingest_progress_before_start
First seen 2 years, 10 months ago in 9ff0a7e
CI
github-actions:test
12 runs
Average
276 ms
median 297 ms
max 360 ms
max 360 ms
Phases
Setup 0.90 ms
Call 275 ms
Teardown 0.25 ms
Categories
Database 156 ms
App code 0.53 ms
Factories 0.48 ms
Other (DB schema, Libraries, Imports, Unsampled, ...) 120 ms
133 database queries per run
Needs 228 KB of memory (max 824 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 16 hours ago ·
open run
setup0.76 ms0.3%
call267 ms99.6%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()94 ms35.1%
TransactionTestCase._fixture_teardowndjango/test/testcases.py:127594 ms35.1%
call_commanddjango/core/management/__init__.py:19594 ms35.1%
BaseCommand.executedjango/core/management/base.py:46094 ms35.1%
Command.handledjango/core/management/commands/flush.py:9250 ms18.7%
emit_post_migrate_signaldjango/core/management/sql.py:5250 ms18.7%
Signal.senddjango/dispatch/dispatcher.py:20950 ms18.7%
create_permissionsdjango/contrib/auth/management/__init__.py:8019 ms7.0%
ContentTypeManager.get_for_modelsdjango/contrib/contenttypes/models.py:9118 ms6.5%
QuerySet.__iter__django/db/models/query.py:39018 ms6.5%
QuerySet._fetch_alldjango/db/models/query.py:200018 ms6.5%
ModelIterable.__iter__django/db/models/query.py:9518 ms6.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162418 ms6.5%
CursorWrapper.executedjango/db/backends/utils.py:7918 ms6.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9218 ms6.5%
CursorWrapper._executedjango/db/backends/utils.py:10518 ms6.5%
Cursor.executepsycopg/cursor.py:11316 ms6.1%
Connection.waitpsycopg/connection.py:49516 ms6.1%
1 smaller frames hidden
create_permissionsdjango/contrib/auth/management/__init__.py:10710 ms3.7%
QuerySet.bulk_createdjango/db/models/query.py:83310 ms3.7%
QuerySet._batched_insertdjango/db/models/query.py:195610 ms3.7%
QuerySet._insertdjango/db/models/query.py:191810 ms3.7%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19259 ms3.3%
CursorWrapper.executedjango/db/backends/utils.py:799 ms3.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:928 ms2.8%
CursorWrapper._executedjango/db/backends/utils.py:1056 ms2.3%
Cursor.executepsycopg/cursor.py:1136 ms2.3%
Connection.waitpsycopg/connection.py:4956 ms2.3%
1 smaller frames hidden
create_permissionsdjango/contrib/auth/management/__init__.py:619 ms3.3%
create_contenttypesdjango/contrib/contenttypes/management/__init__.py:1325 ms1.9%
QuerySet.bulk_createdjango/db/models/query.py:8335 ms1.9%
QuerySet._batched_insertdjango/db/models/query.py:19565 ms1.9%
QuerySet._insertdjango/db/models/query.py:19185 ms1.9%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19254 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:794 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:924 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:1054 ms1.4%
Cursor.executepsycopg/cursor.py:1134 ms1.4%
Connection.waitpsycopg/connection.py:4954 ms1.4%
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
create_permissionsdjango/contrib/auth/management/__init__.py:876 ms2.3%
QuerySet.__iter__django/db/models/query.py:3906 ms2.3%
QuerySet._fetch_alldjango/db/models/query.py:20006 ms2.3%
ValuesListIterable.__iter__django/db/models/query.py:2386 ms2.3%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15736 ms2.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16245 ms1.9%
CursorWrapper.executedjango/db/backends/utils.py:795 ms1.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:925 ms1.9%
CursorWrapper._executedjango/db/backends/utils.py:1055 ms1.9%
Cursor.executepsycopg/cursor.py:1135 ms1.9%
Connection.waitpsycopg/connection.py:4955 ms1.9%
1 smaller frames hidden
create_contenttypesdjango/contrib/contenttypes/management/__init__.py:1224 ms1.4%
QuerySet.__iter__django/db/models/query.py:3904 ms1.4%
QuerySet._fetch_alldjango/db/models/query.py:20004 ms1.4%
FlatValuesListIterable.__iter__django/db/models/query.py:2774 ms1.4%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15734 ms1.4%
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
2 smaller frames hidden
Command.handledjango/core/management/commands/flush.py:7440 ms15.0%
BaseDatabaseOperations.execute_sql_flushdjango/db/backends/base/operations.py:46833 ms12.2%
CursorWrapper.executedjango/db/backends/utils.py:7933 ms12.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9233 ms12.2%
CursorWrapper._executedjango/db/backends/utils.py:10333 ms12.2%
Cursor.executepsycopg/cursor.py:11333 ms12.2%
Connection.waitpsycopg/connection.py:49533 ms12.2%
BaseDatabaseOperations.execute_sql_flushdjango/db/backends/base/operations.py:4628 ms2.8%
Atomic.__exit__django/db/transaction.py:2638 ms2.8%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:268 ms2.8%
BaseDatabaseWrapper.commitdjango/db/backends/base/base.py:3278 ms2.8%
BaseDatabaseWrapper._commitdjango/db/backends/base/base.py:3038 ms2.8%
Connection.commitpsycopg/connection.py:3098 ms2.8%
Connection.waitpsycopg/connection.py:4958 ms2.8%
Command.handledjango/core/management/commands/flush.py:524 ms1.4%
sql_flushdjango/core/management/sql.py:114 ms1.4%
BaseDatabaseIntrospection.django_table_namesdjango/db/backends/base/introspection.py:1134 ms1.4%
BaseDatabaseIntrospection.table_namesdjango/db/backends/base/introspection.py:604 ms1.4%
BaseDatabaseIntrospection.table_names.<locals>.get_namesdjango/db/backends/base/introspection.py:544 ms1.4%
DatabaseIntrospection.get_table_listdjango/db/backends/postgresql/introspection.py:584 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:794 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:924 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:1034 ms1.4%
Cursor.executepsycopg/cursor.py:1134 ms1.4%
Connection.waitpsycopg/connection.py:4954 ms1.4%
IngestStartEndpointTest.test_ingest_progress_before_startapps/api/tests.py:234 self.join_workers()65 ms24.3%
IngestStartEndpointTest.join_workersapps/api/tests.py:76 drain(current_app(), raise_on_failure=True)65 ms24.3%
drainpotatoq/testing.py:7364 ms23.9%
executepotatoq/worker/executor.py:28864 ms23.9%
_executepotatoq/worker/executor.py:36864 ms23.9%
Task.__call__potatoq/task.py:19264 ms23.9%
warm_reportsapps/api/tasks.py:266 flaky_report(Project.objects.get(pk=project_id), DEFAULT_DAYS)20 ms7.5%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:8711 ms4.2%
QuerySet.getdjango/db/models/query.py:63511 ms4.2%
QuerySet.__len__django/db/models/query.py:37211 ms4.2%
QuerySet._fetch_alldjango/db/models/query.py:200011 ms4.2%
ModelIterable.__iter__django/db/models/query.py:9511 ms4.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162210 ms3.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.7%
BaseDatabaseWrapper.cursordjango/db/backends/base/base.py:32010 ms3.7%
BaseDatabaseWrapper._cursordjango/db/backends/base/base.py:29610 ms3.7%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:30310 ms3.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.7%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:27910 ms3.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.7%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2569 ms3.3%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms3.3%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:3339 ms3.3%
Connection.connectpsycopg/connection.py:1099 ms3.3%
wait_connpsycopg/waiting.py:1415 ms1.9%
EpollSelector.select<stdlib>/selectors.py:4525 ms1.9%
wait_connpsycopg/waiting.py:1454 ms1.4%
BaseConnection._connect_genpsycopg/_connection_base.py:4394 ms1.4%
1 smaller frames hidden
1 smaller frames hidden
flaky_reportapps/projects/flakiness.py:2536 ms2.3%
compute_flaky_reportapps/projects/flakiness.py:2685 ms1.9%
1 smaller frames hidden
flaky_reportapps/projects/flakiness.py:2503 ms0.9%
Atomic.__enter__django/db/transaction.py:19820 ms7.5%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:45420 ms7.5%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:30320 ms7.5%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2620 ms7.5%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:27920 ms7.5%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2620 ms7.5%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:25619 ms7.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2619 ms7.0%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:33319 ms7.0%
Connection.connectpsycopg/connection.py:10919 ms7.0%
wait_connpsycopg/waiting.py:14510 ms3.7%
BaseConnection._connect_genpsycopg/_connection_base.py:43910 ms3.7%
wait_connpsycopg/waiting.py:1418 ms2.8%
EpollSelector.select<stdlib>/selectors.py:4528 ms2.8%
1 smaller frames hidden
1 smaller frames hidden
process_ingest_progressapps/api/tasks.py:1855 ms1.9%
update_session_countsapps/api/tasks.py:193 counts = TestRun.objects.filter(session=session).aggregate(5 ms1.9%
QuerySet.aggregatedjango/db/models/query.py:5945 ms1.9%
Query.get_aggregationdjango/db/models/sql/query.py:4674 ms1.4%
Count.resolve_expressiondjango/db/models/aggregates.py:2614 ms1.4%
Aggregate.resolve_expressiondjango/db/models/aggregates.py:1224 ms1.4%
BaseExpression.resolve_expressiondjango/db/models/expressions.py:3014 ms1.4%
BaseExpression.resolve_expressiondjango/db/models/expressions.py:3014 ms1.4%
Q.resolve_expressiondjango/db/models/query_utils.py:954 ms1.4%
Query._add_qdjango/db/models/sql/query.py:17034 ms1.4%
Query.build_filterdjango/db/models/sql/query.py:15604 ms1.4%
Query.resolve_lookup_valuedjango/db/models/sql/query.py:13234 ms1.4%
<GC>~4 ms1.4%
1 smaller frames hidden
process_ingest_progressapps/api/tasks.py:1214 ms1.4%
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%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms0.9%
6 smaller frames hidden
1 smaller frames hidden
IngestStartEndpointTest.test_ingest_progress_before_startapps/api/tests.py:21634 ms12.6%
IngestStartEndpointTest.ingest_startapps/api/tests.py:98 return self.client.post(34 ms12.6%
Client.postdjango/test/client.py:115334 ms12.6%
RequestFactory.postdjango/test/client.py:49934 ms12.6%
RequestFactory.genericdjango/test/client.py:67134 ms12.6%
Client.requestdjango/test/client.py:108234 ms12.6%
ClientHandler.__call__django/test/client.py:18620 ms7.5%
BaseHandler.get_responsedjango/core/handlers/base.py:14120 ms7.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5520 ms7.5%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:13020 ms7.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5520 ms7.5%
MiddlewareMixin.__call__django/utils/deprecation.py:30920 ms7.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5520 ms7.5%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12320 ms7.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5520 ms7.5%
MiddlewareMixin.__call__django/utils/deprecation.py:30920 ms7.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5520 ms7.5%
MiddlewareMixin.__call__django/utils/deprecation.py:30920 ms7.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5520 ms7.5%
MiddlewareMixin.__call__django/utils/deprecation.py:30920 ms7.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5520 ms7.5%
MiddlewareMixin.__call__django/utils/deprecation.py:30920 ms7.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5520 ms7.5%
MiddlewareMixin.__call__django/utils/deprecation.py:30920 ms7.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5520 ms7.5%
MiddlewareMixin.__call__django/utils/deprecation.py:30920 ms7.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5520 ms7.5%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:3420 ms7.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5520 ms7.5%
BaseHandler._get_responsedjango/core/handlers/base.py:19820 ms7.5%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:6520 ms7.5%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:3720 ms7.5%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:6420 ms7.5%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:7515 ms5.6%
ingest_startapps/api/urls.py:100 process_ingest_start(ingest.id)13 ms4.7%
_SharedTaskProxy.__call__potatoq/app.py:76313 ms4.7%
Task.__call__potatoq/task.py:18913 ms4.7%
process_ingest_startapps/api/tasks.py:844 ms1.4%
get_or_create_environmentapps/projects/environments.py:63 obj, created = Environment.objects.get_or_create(4 ms1.4%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:874 ms1.4%
QuerySet.get_or_createdjango/db/models/query.py:9873 ms0.9%
1 smaller frames hidden
process_ingest_startapps/api/tasks.py:773 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%
3 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%
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:17314 ms5.1%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6214 ms5.1%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10413 ms4.7%
WhiteNoise.add_fileswhitenoise/base.py:10813 ms4.7%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12011 ms4.2%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13111 ms4.2%
WhiteNoise.get_static_filewhitenoise/base.py:20810 ms3.7%
StaticFile.__init__whitenoise/responders.py:744 ms1.4%
StaticFile.__init__whitenoise/responders.py:734 ms1.4%
StaticFile.get_headerswhitenoise/responders.py:1783 ms0.9%
parsedate<stdlib>/email/_parseaddr.py:1853 ms0.9%
1 smaller frames hidden
StaticFile.__init__whitenoise/responders.py:773 ms0.9%
StaticFile.get_alternativeswhitenoise/responders.py:2003 ms0.9%
1 smaller frames hidden
1 smaller frames hidden
IngestStartEndpointTest.test_ingest_progress_before_startapps/api/tests.py:22825 ms9.4%
IngestStartEndpointTest.join_workersapps/api/tests.py:76 drain(current_app(), raise_on_failure=True)25 ms9.4%
drainpotatoq/testing.py:7325 ms9.4%
executepotatoq/worker/executor.py:28825 ms9.4%
_executepotatoq/worker/executor.py:36825 ms9.4%
Task.__call__potatoq/task.py:19225 ms9.4%
Atomic.__enter__django/db/transaction.py:19813 ms4.7%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:45413 ms4.7%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:30313 ms4.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2613 ms4.7%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:27913 ms4.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2613 ms4.7%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:25613 ms4.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2613 ms4.7%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:33313 ms4.7%
Connection.connectpsycopg/connection.py:10913 ms4.7%
wait_connpsycopg/waiting.py:1455 ms1.9%
BaseConnection._connect_genpsycopg/_connection_base.py:4395 ms1.9%
wait_connpsycopg/waiting.py:1384 ms1.4%
_PollLikeSelector.register<stdlib>/selectors.py:3423 ms0.9%
1 smaller frames hidden
wait_connpsycopg/waiting.py:1414 ms1.4%
EpollSelector.select<stdlib>/selectors.py:4524 ms1.4%
process_ingest_progressapps/api/tasks.py:1214 ms1.4%
7 smaller frames hidden
IngestStartEndpointTest.setUpapps/api/tests.py:73 self.project = baker.make("projects.Project", secrettokens_set__token=self.secret_token)15 ms5.6%
makemodel_bakery/baker.py:14715 ms5.6%
Baker.makemodel_bakery/baker.py:40615 ms5.6%
Baker._makemodel_bakery/baker.py:47111 ms4.2%
Baker.generate_valuemodel_bakery/baker.py:80011 ms4.2%
gen_relatedmodel_bakery/random_gen.py:27411 ms4.2%
makemodel_bakery/baker.py:14711 ms4.2%
Baker.makemodel_bakery/baker.py:40611 ms4.2%
Baker._makemodel_bakery/baker.py:48211 ms4.2%
Baker.instancemodel_bakery/baker.py:53511 ms4.2%
Model.savedjango/db/models/base.py:87411 ms4.2%
Model.save_basedjango/db/models/base.py:96611 ms4.2%
Model._save_tabledjango/db/models/base.py:116711 ms4.2%
Model._do_insertdjango/db/models/base.py:121811 ms4.2%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:8711 ms4.2%
QuerySet._insertdjango/db/models/query.py:191811 ms4.2%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:192310 ms3.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.7%
BaseDatabaseWrapper.cursordjango/db/backends/base/base.py:32010 ms3.7%
BaseDatabaseWrapper._cursordjango/db/backends/base/base.py:29610 ms3.7%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:30310 ms3.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.7%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:27910 ms3.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.7%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2569 ms3.3%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms3.3%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:3339 ms3.3%
Connection.connectpsycopg/connection.py:1099 ms3.3%
wait_connpsycopg/waiting.py:1415 ms1.9%
EpollSelector.select<stdlib>/selectors.py:4525 ms1.9%
wait_connpsycopg/waiting.py:1454 ms1.4%
BaseConnection._connect_genpsycopg/_connection_base.py:4394 ms1.4%
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%
1 smaller frames hidden
IngestStartEndpointTest.test_ingest_progress_before_startapps/api/tests.py:23015 ms5.6%
IngestStartEndpointTest.ingest_endapps/api/tests.py:11415 ms5.6%
Client.postdjango/test/client.py:115315 ms5.6%
RequestFactory.postdjango/test/client.py:49915 ms5.6%
RequestFactory.genericdjango/test/client.py:67115 ms5.6%
Client.requestdjango/test/client.py:108215 ms5.6%
ClientHandler.__call__django/test/client.py:18615 ms5.6%
BaseHandler.get_responsedjango/core/handlers/base.py:14115 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.6%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:13015 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.6%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12315 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.6%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:3415 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.6%
BaseHandler._get_responsedjango/core/handlers/base.py:19815 ms5.6%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:6515 ms5.6%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:3715 ms5.6%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:6415 ms5.6%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:72 project = get_object_or_404(Project, secrettokens__token=request.headers.get("Authorization"))13 ms4.7%
get_object_or_404django/shortcuts.py:9013 ms4.7%
QuerySet.getdjango/db/models/query.py:63513 ms4.7%
QuerySet.__len__django/db/models/query.py:37213 ms4.7%
QuerySet._fetch_alldjango/db/models/query.py:200013 ms4.7%
ModelIterable.__iter__django/db/models/query.py:9513 ms4.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162210 ms3.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.7%
BaseDatabaseWrapper.cursordjango/db/backends/base/base.py:32010 ms3.7%
BaseDatabaseWrapper._cursordjango/db/backends/base/base.py:29610 ms3.7%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:30310 ms3.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.7%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:27910 ms3.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.7%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:25610 ms3.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.7%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:33310 ms3.7%
Connection.connectpsycopg/connection.py:10910 ms3.7%
wait_connpsycopg/waiting.py:1415 ms1.9%
EpollSelector.select<stdlib>/selectors.py:4525 ms1.9%
wait_connpsycopg/waiting.py:1454 ms1.4%
BaseConnection._connect_genpsycopg/_connection_base.py:4394 ms1.4%
1 smaller frames hidden
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%
2 smaller frames hidden
IngestStartEndpointTest.test_ingest_progress_before_startapps/api/tests.py:235 run = Run.objects.filter(project=self.project).get()11 ms4.2%
QuerySet.getdjango/db/models/query.py:63511 ms4.2%
QuerySet.__len__django/db/models/query.py:37211 ms4.2%
QuerySet._fetch_alldjango/db/models/query.py:200011 ms4.2%
ModelIterable.__iter__django/db/models/query.py:9511 ms4.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162210 ms3.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.7%
BaseDatabaseWrapper.cursordjango/db/backends/base/base.py:32010 ms3.7%
BaseDatabaseWrapper._cursordjango/db/backends/base/base.py:29610 ms3.7%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:30310 ms3.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.7%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:27910 ms3.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms3.7%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2569 ms3.3%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms3.3%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:3339 ms3.3%
Connection.connectpsycopg/connection.py:1099 ms3.3%
wait_connpsycopg/waiting.py:1415 ms1.9%
EpollSelector.select<stdlib>/selectors.py:4525 ms1.9%
wait_connpsycopg/waiting.py:1454 ms1.4%
BaseConnection._connect_genpsycopg/_connection_base.py:4394 ms1.4%
1 smaller frames hidden
1 smaller frames hidden
IngestStartEndpointTest.test_ingest_progress_before_startapps/api/tests.py:2204 ms1.4%
IngestStartEndpointTest.ingest_progressapps/api/tests.py:1064 ms1.4%
Client.postdjango/test/client.py:11534 ms1.4%
RequestFactory.postdjango/test/client.py:4994 ms1.4%
RequestFactory.genericdjango/test/client.py:6714 ms1.4%
Client.requestdjango/test/client.py:10824 ms1.4%
ClientHandler.__call__django/test/client.py:1864 ms1.4%
BaseHandler.get_responsedjango/core/handlers/base.py:1414 ms1.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms1.4%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1304 ms1.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms1.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms1.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms1.4%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1234 ms1.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms1.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms1.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms1.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms1.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms1.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms1.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms1.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms1.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms1.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms1.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms1.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms1.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms1.4%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:344 ms1.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms1.4%
BaseHandler._get_responsedjango/core/handlers/base.py:1984 ms1.4%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:654 ms1.4%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:374 ms1.4%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:644 ms1.4%
TransactionTestCase._post_teardowndjango/test/testcases.py:12503 ms0.9%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:263 ms0.9%
BaseDatabaseWrapper.closedjango/db/backends/base/base.py:3553 ms0.9%
DatabaseWrapper._closedjango/db/backends/postgresql/base.py:3963 ms0.9%
Connection.closepsycopg/connection.py:2013 ms0.9%
1 smaller frames hidden
Estimated from 214 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
|
38 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
|
16 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:98
return self.client.post(
IngestStartEndpointTest.ingest_start
· Libraries
|
14 ms |
|
apps/api/tasks.py:266
flaky_report(Project.objects.get(pk=project_id), DEFAULT_DAYS)
warm_reports
· Database
|
11 ms |
|
apps/api/tests.py:235
run = Run.objects.filter(project=self.project).get()
IngestStartEndpointTest.test_ingest_progress_before_start
· Database
|
11 ms |
|
apps/api/tasks.py:193
counts = TestRun.objects.filter(session=session).aggregate(
update_session_counts
· Database
|
6 ms |
|
apps/api/urls.py:59
SecretTokens.objects.filter(pk__in=list(stale)).update(date_last_used=now)
touch_token
· Database
|
4 ms |
|
apps/projects/environments.py:63
obj, created = Environment.objects.get_or_create(
get_or_create_environment
· Database
|
4 ms |
|
apps/api/tasks.py:118
session = Session.objects.get(project=ingest.project, ingest_id=parent_ingest_id)
process_ingest_progress
· Database
|
4 ms |
Fixtures
Exact setup time| _dj_autoclear_mailbox function | 0.05 ms |
| _template_string_if_invalid_marker function | 0.05 ms |
| _django_db_marker function | 0.04 ms |
| _live_server_helper function | 0.04 ms |
| _django_set_urlconf function | 0.03 ms |
| _django_clear_site_cache function | 0.03 ms |
| monkeypatch function | 0.02 ms |
Database
133 queries · 96 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
|
155 ms |
|
call _post_teardown
django/test/testcases.py:1240
|
96 ms |
|
call setUp
apps/api/tests.py:73
|
15 ms |
| setup pytest internals | 0.76 ms |
Reliability
12 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 12 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 16 hours ago | CI github-actions:test | passed | 268 ms | Profile |
| 1 week, 5 days ago | CI github-actions:test | passed | 176 ms | Profile |
| 2 weeks, 1 day ago | CI github-actions:test | passed | 360 ms | Profile |
| 2 weeks, 1 day ago | CI github-actions:test | passed | 238 ms | Profile |
| 2 weeks, 1 day ago | CI github-actions:test | passed | 324 ms | Profile |
| 2 weeks, 2 days ago | CI github-actions:test | passed | 199 ms | Profile |
| 2 weeks, 4 days ago | CI github-actions:test | passed | 315 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 299 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 314 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 344 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 189 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 295 ms | Profile |