Tests / starter_packs/tests.py
TestToggleStarterPackAccount::test_add_account
First seen 1 year, 10 months ago in fd2a55f
CI
github-actions:test
4 runs
Average
264 ms
median 299 ms
max 339 ms
max 339 ms
Phases
Setup 41 ms
Call 223 ms
Teardown 0.34 ms
Categories
Database 98 ms
Factories 4 ms
Other (Libraries, pytest, Deep copies, Unsampled) 162 ms
42 database queries per run
Needs 36 KB of memory (max 76 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 7 hours ago ·
open run
setup26 ms21.9%
TestCase.setUpClassdjango/test/testcases.py:1442 cls.setUpTestData()17 ms14.0%
TestToggleStarterPackAccount.setUpTestDatastarter_packs/tests.py:358 baker.make("mastodon_auth.AccountAccess", user=cls.user)8 ms7.0%
makemodel_bakery/baker.py:1758 ms7.0%
Baker.makemodel_bakery/baker.py:4548 ms7.0%
Baker._makemodel_bakery/baker.py:5296 ms5.3%
Baker.generate_valuemodel_bakery/baker.py:10196 ms5.3%
gen_relatedmodel_bakery/random_gen.py:4545 ms4.4%
makemodel_bakery/baker.py:1755 ms4.4%
Baker.makemodel_bakery/baker.py:4545 ms4.4%
Baker._makemodel_bakery/baker.py:5424 ms3.5%
Baker.instancemodel_bakery/baker.py:6593 ms2.6%
Model.savedjango/db/models/base.py:9043 ms2.6%
Model.save_basedjango/db/models/base.py:9963 ms2.6%
Model._save_tabledjango/db/models/base.py:11993 ms2.6%
Model._do_insertdjango/db/models/base.py:12513 ms2.6%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms2.6%
QuerySet._insertdjango/db/models/query.py:21413 ms2.6%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19363 ms2.6%
CursorWrapper.executedjango/db/backends/utils.py:793 ms2.6%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms2.6%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms2.6%
Cursor.executepsycopg/cursor.py:1133 ms2.6%
Connection.waitpsycopg/connection.py:4953 ms2.6%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms0.9%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms0.9%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms0.9%
Baker.instancemodel_bakery/baker.py:6611 ms0.9%
Baker._makemodel_bakery/baker.py:5291 ms0.9%
Baker.generate_valuemodel_bakery/baker.py:10191 ms0.9%
gen_stringmodel_bakery/random_gen.py:2701 ms0.9%
gen_string.<locals>.<genexpr>model_bakery/random_gen.py:2701 ms0.9%
gen_stringmodel_bakery/random_gen.py:2701 ms0.9%
gen_string.<locals>.<genexpr>model_bakery/random_gen.py:2701 ms0.9%
Random.choice<stdlib>/random.py:3541 ms0.9%
Baker._makemodel_bakery/baker.py:5422 ms1.8%
Baker.instancemodel_bakery/baker.py:6592 ms1.8%
Model.savedjango/db/models/base.py:9042 ms1.8%
Model.save_basedjango/db/models/base.py:9962 ms1.8%
Model._save_tabledjango/db/models/base.py:11992 ms1.8%
Model._do_insertdjango/db/models/base.py:12512 ms1.8%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms1.8%
QuerySet._insertdjango/db/models/query.py:21412 ms1.8%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19362 ms1.8%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.8%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms0.9%
Cursor.executepsycopg/cursor.py:1131 ms0.9%
Connection.waitpsycopg/connection.py:4951 ms0.9%
BaseCursor._execute_genpsycopg/_cursor_base.py:2051 ms0.9%
BaseCursor._convert_querypsycopg/_cursor_base.py:4651 ms0.9%
PostgresClientQuery.convertpsycopg/_queries.py:2891 ms0.9%
PostgresClientQuery.dumppsycopg/_queries.py:2991 ms0.9%
TestToggleStarterPackAccount.setUpTestDatastarter_packs/tests.py:357 cls.user = baker.make("auth.User")5 ms4.4%
makemodel_bakery/baker.py:1755 ms4.4%
Baker.makemodel_bakery/baker.py:4545 ms4.4%
Baker._makemodel_bakery/baker.py:5425 ms4.4%
Baker.instancemodel_bakery/baker.py:6595 ms4.4%
AbstractBaseUser.savedjango/contrib/auth/base_user.py:625 ms4.4%
Model.savedjango/db/models/base.py:9045 ms4.4%
Model.save_basedjango/db/models/base.py:9965 ms4.4%
Model._save_tabledjango/db/models/base.py:11995 ms4.4%
Model._do_insertdjango/db/models/base.py:12515 ms4.4%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:875 ms4.4%
QuerySet._insertdjango/db/models/query.py:21415 ms4.4%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19365 ms4.4%
CursorWrapper.executedjango/db/backends/utils.py:795 ms4.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:925 ms4.4%
CursorWrapper._executedjango/db/backends/utils.py:1055 ms4.4%
Cursor.executepsycopg/cursor.py:1135 ms4.4%
Connection.waitpsycopg/connection.py:4955 ms4.4%
BaseCursor._execute_genpsycopg/_cursor_base.py:2064 ms3.5%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2864 ms3.5%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:784 ms3.5%
TestToggleStarterPackAccount.setUpTestDatastarter_packs/tests.py:359 cls.starter_pack = baker.make("starter_packs.StarterPack", created_by=cls.user)2 ms1.8%
makemodel_bakery/baker.py:1752 ms1.8%
Baker.makemodel_bakery/baker.py:4542 ms1.8%
Baker._makemodel_bakery/baker.py:5422 ms1.8%
Baker.instancemodel_bakery/baker.py:6592 ms1.8%
Model.savedjango/db/models/base.py:9042 ms1.8%
Model.save_basedjango/db/models/base.py:9962 ms1.8%
Model._save_tabledjango/db/models/base.py:11992 ms1.8%
Model._do_insertdjango/db/models/base.py:12512 ms1.8%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms1.8%
QuerySet._insertdjango/db/models/query.py:21412 ms1.8%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19362 ms1.8%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.8%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.8%
Cursor.executepsycopg/cursor.py:1132 ms1.8%
Connection.waitpsycopg/connection.py:4952 ms1.8%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms0.9%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms0.9%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms0.9%
TestToggleStarterPackAccount.setUpTestDatastarter_packs/tests.py:360 cls.starter_pack.owners.add(cls.user)1 ms0.9%
create_forward_many_to_many_manager.<locals>.ManyRelatedManager.adddjango/db/models/fields/related_descriptors.py:13241 ms0.9%
create_forward_many_to_many_manager.<locals>.ManyRelatedManager._add_basedjango/db/models/fields/related_descriptors.py:13011 ms0.9%
create_forward_many_to_many_manager.<locals>.ManyRelatedManager._add_itemsdjango/db/models/fields/related_descriptors.py:16031 ms0.9%
QuerySet.bulk_createdjango/db/models/query.py:9001 ms0.9%
QuerySet._batched_insertdjango/db/models/query.py:21791 ms0.9%
QuerySet._insertdjango/db/models/query.py:21411 ms0.9%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19361 ms0.9%
CursorWrapper.executedjango/db/backends/utils.py:791 ms0.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms0.9%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms0.9%
Cursor.executepsycopg/cursor.py:1131 ms0.9%
Connection.waitpsycopg/connection.py:4951 ms0.9%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms0.9%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms0.9%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms0.9%
TestCase.setUpClassdjango/test/testcases.py:1426 cls.cls_atomics = cls._enter_atomics()7 ms6.1%
TestCase._enter_atomicsdjango/test/testcases.py:13997 ms6.1%
Atomic.__enter__django/db/transaction.py:2107 ms6.1%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:4547 ms6.1%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:3047 ms6.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:267 ms6.1%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:2797 ms6.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:267 ms6.1%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2567 ms6.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:267 ms6.1%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:3457 ms6.1%
Connection.connectpsycopg/connection.py:1097 ms6.1%
wait_connpsycopg/waiting.py:1455 ms4.4%
BaseConnection._connect_genpsycopg/_connection_base.py:4395 ms4.4%
wait_connpsycopg/waiting.py:1412 ms1.8%
EpollSelector.select<stdlib>/selectors.py:4522 ms1.8%
call92 ms77.8%
TestToggleStarterPackAccount.test_add_accountstarter_packs/tests.py:365 response = self.client.post(64 ms54.1%
Client.postdjango/test/client.py:116264 ms54.1%
RequestFactory.postdjango/test/client.py:49964 ms54.1%
RequestFactory.genericdjango/test/client.py:67164 ms54.1%
Client.requestdjango/test/client.py:109164 ms54.1%
ClientHandler.__call__django/test/client.py:17334 ms28.8%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6334 ms28.8%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10434 ms28.8%
WhiteNoise.add_fileswhitenoise/base.py:10834 ms28.8%
WhiteNoise.update_files_dictionarywhitenoise/base.py:11522 ms18.6%
scantreewhitenoise/base.py:27122 ms18.6%
scantreewhitenoise/base.py:27122 ms18.6%
scantreewhitenoise/base.py:27314 ms11.8%
<GC>~12 ms10.1%
scantreewhitenoise/base.py:2694 ms3.4%
scantreewhitenoise/base.py:2712 ms1.7%
scantreewhitenoise/base.py:2712 ms1.7%
scantreewhitenoise/base.py:2712 ms1.7%
scantreewhitenoise/base.py:2732 ms1.7%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12012 ms10.1%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13112 ms10.1%
WhiteNoise.get_static_filewhitenoise/base.py:21710 ms8.5%
StaticFile.__init__whitenoise/responders.py:766 ms5.1%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1882 ms1.7%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1892 ms1.7%
StaticFile.__init__whitenoise/responders.py:772 ms1.7%
StaticFile.get_alternativeswhitenoise/responders.py:2012 ms1.7%
StaticFile.__init__whitenoise/responders.py:732 ms1.7%
StaticFile.get_headerswhitenoise/responders.py:1672 ms1.7%
WhiteNoise.get_static_filewhitenoise/base.py:2122 ms1.7%
WhiteNoise.add_cache_headerswhitenoise/base.py:2332 ms1.7%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1762 ms1.7%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1972 ms1.7%
URLMixin.urldebug_toolbar/panels/staticfiles.py:202 ms1.7%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2352 ms1.7%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2142 ms1.7%
ClientHandler.__call__django/test/client.py:18630 ms25.4%
BaseHandler.get_responsedjango/core/handlers/base.py:14230 ms25.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms25.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms25.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms25.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms25.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms25.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms25.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms25.4%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12330 ms25.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms25.4%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14530 ms25.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms25.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms25.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms25.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms25.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms25.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms25.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms25.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms25.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms25.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms25.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms25.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms25.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms25.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms25.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms25.4%
BaseHandler._get_responsedjango/core/handlers/base.py:19930 ms25.4%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:6224 ms20.3%
toggle_account_to_starter_packstarter_packs/views.py:66012 ms10.1%
get_splash_image_signaturestarter_packs/splash_images.py:8812 ms10.1%
get_splash_image_accountsstarter_packs/splash_images.py:77 return list(accounts)12 ms10.1%
QuerySet.__iter__django/db/models/query.py:43912 ms10.1%
QuerySet._fetch_alldjango/db/models/query.py:226212 ms10.1%
ModelIterable.__iter__django/db/models/query.py:10310 ms8.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16258 ms6.8%
CursorWrapper.executedjango/db/backends/utils.py:798 ms6.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:928 ms6.8%
CursorWrapper._executedjango/db/backends/utils.py:1058 ms6.8%
Cursor.executepsycopg/cursor.py:1138 ms6.8%
Connection.waitpsycopg/connection.py:4958 ms6.8%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16122 ms1.7%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7682 ms1.7%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:892 ms1.7%
SQLCompiler.setup_querydjango/db/models/sql/compiler.py:782 ms1.7%
SQLCompiler.get_selectdjango/db/models/sql/compiler.py:3192 ms1.7%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5792 ms1.7%
ModelIterable.__iter__django/db/models/query.py:1352 ms1.7%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15782 ms1.7%
SQLCompiler.get_convertersdjango/db/models/sql/compiler.py:15272 ms1.7%
Col.get_db_convertersdjango/db/models/expressions.py:13832 ms1.7%
Field.__eq__django/db/models/fields/__init__.py:7192 ms1.7%
toggle_account_to_starter_packstarter_packs/views.py:6186 ms5.1%
get_editable_packstarter_packs/views.py:60 return get_object_or_404(StarterPack, slug=slug, owners=request.user, **extra)6 ms5.1%
get_object_or_404django/shortcuts.py:1006 ms5.1%
QuerySet.getdjango/db/models/query.py:7026 ms5.1%
QuerySet.__len__django/db/models/query.py:4216 ms5.1%
QuerySet._fetch_alldjango/db/models/query.py:22626 ms5.1%
ModelIterable.__iter__django/db/models/query.py:1036 ms5.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16256 ms5.1%
CursorWrapper.executedjango/db/backends/utils.py:796 ms5.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:926 ms5.1%
CursorWrapper._executedjango/db/backends/utils.py:1056 ms5.1%
Cursor.executepsycopg/cursor.py:1136 ms5.1%
Connection.waitpsycopg/connection.py:4956 ms5.1%
BaseCursor._execute_genpsycopg/_cursor_base.py:2052 ms1.7%
BaseCursor._convert_querypsycopg/_cursor_base.py:4652 ms1.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms1.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:3182 ms1.7%
BaseCursor._set_resultspsycopg/_cursor_base.py:5352 ms1.7%
BaseCursor._select_current_resultpsycopg/_cursor_base.py:5142 ms1.7%
toggle_account_to_starter_packstarter_packs/views.py:619 starter_pack = get_object_or_404(StarterPack.objects.select_for_update(), pk=editable.pk)2 ms1.7%
get_object_or_404django/shortcuts.py:1002 ms1.7%
QuerySet.getdjango/db/models/query.py:7022 ms1.7%
QuerySet.__len__django/db/models/query.py:4212 ms1.7%
QuerySet._fetch_alldjango/db/models/query.py:22622 ms1.7%
ModelIterable.__iter__django/db/models/query.py:1032 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16252 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
toggle_account_to_starter_packstarter_packs/views.py:620 account = get_object_or_404(Account, id=account_id)2 ms1.7%
get_object_or_404django/shortcuts.py:1002 ms1.7%
QuerySet.getdjango/db/models/query.py:7022 ms1.7%
QuerySet.__len__django/db/models/query.py:4212 ms1.7%
QuerySet._fetch_alldjango/db/models/query.py:22622 ms1.7%
ModelIterable.__iter__django/db/models/query.py:1032 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16252 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms1.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms1.7%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms1.7%
toggle_account_to_starter_packstarter_packs/views.py:621 if StarterPackAccount.objects.filter(starter_pack=starter_pack, account_id=account_id).exists():2 ms1.7%
QuerySet.existsdjango/db/models/query.py:14582 ms1.7%
Query.has_resultsdjango/db/models/sql/query.py:6872 ms1.7%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15932 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16252 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms1.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms1.7%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms1.7%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:594 ms3.4%
login_required.<locals>.<lambda>django/contrib/auth/decorators.py:824 ms3.4%
new_method_proxy.<locals>.innerdjango/utils/functional.py:2514 ms3.4%
SimpleLazyObject._setupdjango/utils/functional.py:4044 ms3.4%
AuthenticationMiddleware.process_request.<locals>.<lambda>django/contrib/auth/middleware.py:394 ms3.4%
get_userdjango/contrib/auth/middleware.py:194 ms3.4%
get_userdjango/contrib/auth/__init__.py:2872 ms1.7%
_get_user_session_keydjango/contrib/auth/__init__.py:1112 ms1.7%
SessionBase.__getitem__django/contrib/sessions/backends/base.py:552 ms1.7%
SessionBase._get_sessiondjango/contrib/sessions/backends/base.py:2542 ms1.7%
SessionStore.loaddjango/contrib/sessions/backends/db.py:552 ms1.7%
SessionStore._get_session_from_dbdjango/contrib/sessions/backends/db.py:342 ms1.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms1.7%
QuerySet.getdjango/db/models/query.py:7022 ms1.7%
QuerySet.__len__django/db/models/query.py:4212 ms1.7%
QuerySet._fetch_alldjango/db/models/query.py:22622 ms1.7%
ModelIterable.__iter__django/db/models/query.py:1032 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16252 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms1.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms1.7%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms1.7%
get_userdjango/contrib/auth/__init__.py:2942 ms1.7%
ModelBackend.get_userdjango/contrib/auth/backends.py:2372 ms1.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms1.7%
QuerySet.getdjango/db/models/query.py:7022 ms1.7%
QuerySet.__len__django/db/models/query.py:4212 ms1.7%
QuerySet._fetch_alldjango/db/models/query.py:22622 ms1.7%
ModelIterable.__iter__django/db/models/query.py:1032 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16252 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms1.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms1.7%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms1.7%
Atomic.__enter__django/db/transaction.py:2232 ms1.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms1.7%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4002 ms1.7%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3672 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms1.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms1.7%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms1.7%
TestToggleStarterPackAccount.test_add_accountstarter_packs/tests.py:364 self.client.force_login(self.user)18 ms15.2%
ClientMixin.force_logindjango/test/client.py:85818 ms15.2%
ClientMixin._logindjango/test/client.py:8848 ms6.8%
ClientMixin.sessiondjango/test/client.py:8158 ms6.8%
SessionStore.savedjango/contrib/sessions/backends/db.py:1218 ms6.8%
SessionStore.createdjango/contrib/sessions/backends/db.py:704 ms3.4%
SessionBase._get_new_session_keydjango/contrib/sessions/backends/base.py:2014 ms3.4%
SessionStore.existsdjango/contrib/sessions/backends/db.py:634 ms3.4%
QuerySet.existsdjango/db/models/query.py:14584 ms3.4%
Query.has_resultsdjango/db/models/sql/query.py:6874 ms3.4%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15934 ms3.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16254 ms3.4%
CursorWrapper.executedjango/db/backends/utils.py:794 ms3.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:924 ms3.4%
CursorWrapper._executedjango/db/backends/utils.py:1054 ms3.4%
Cursor.executepsycopg/cursor.py:1134 ms3.4%
Connection.waitpsycopg/connection.py:4954 ms3.4%
SessionStore.createdjango/contrib/sessions/backends/db.py:744 ms3.4%
SessionStore.savedjango/contrib/sessions/backends/db.py:1232 ms1.7%
SessionStore.create_model_instancedjango/contrib/sessions/backends/db.py:1022 ms1.7%
SessionBase.encodedjango/contrib/sessions/backends/base.py:1292 ms1.7%
dumpsdjango/core/signing.py:1912 ms1.7%
Signer.sign_objectdjango/core/signing.py:2722 ms1.7%
SessionStore.savedjango/contrib/sessions/backends/db.py:1262 ms1.7%
Atomic.__exit__django/db/transaction.py:2592 ms1.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms1.7%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4312 ms1.7%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3752 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
ClientMixin._logindjango/test/client.py:8898 ms6.8%
logindjango/contrib/auth/__init__.py:1894 ms3.4%
SessionBase.cycle_keydjango/contrib/sessions/backends/base.py:4372 ms1.7%
SessionStore.createdjango/contrib/sessions/backends/db.py:742 ms1.7%
SessionStore.savedjango/contrib/sessions/backends/db.py:1262 ms1.7%
Atomic.__enter__django/db/transaction.py:2232 ms1.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms1.7%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4002 ms1.7%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3672 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms1.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms1.7%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms1.7%
SessionBase.cycle_keydjango/contrib/sessions/backends/base.py:4402 ms1.7%
SessionStore.deletedjango/contrib/sessions/backends/db.py:1752 ms1.7%
Model.deletedjango/db/models/base.py:13312 ms1.7%
Collector.deletedjango/db/models/deletion.py:4832 ms1.7%
DeleteQuery.delete_batchdjango/db/models/sql/subqueries.py:432 ms1.7%
DeleteQuery.do_querydjango/db/models/sql/subqueries.py:252 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16252 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
logindjango/contrib/auth/__init__.py:1984 ms3.4%
Signal.senddjango/dispatch/dispatcher.py:2494 ms3.4%
update_last_logindjango/contrib/auth/models.py:244 ms3.4%
AbstractBaseUser.savedjango/contrib/auth/base_user.py:624 ms3.4%
Model.savedjango/db/models/base.py:9044 ms3.4%
Model.save_basedjango/db/models/base.py:9964 ms3.4%
Model._save_tabledjango/db/models/base.py:10942 ms1.7%
Model._save_tabledjango/db/models/base.py:11402 ms1.7%
Model._do_updatedjango/db/models/base.py:12442 ms1.7%
QuerySet._updatedjango/db/models/query.py:14482 ms1.7%
SQLUpdateCompiler.execute_returning_sqldjango/db/models/sql/compiler.py:21502 ms1.7%
SQLUpdateCompiler.execute_sqldjango/db/models/sql/compiler.py:21212 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16252 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms1.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms1.7%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms1.7%
ClientMixin._logindjango/test/client.py:8912 ms1.7%
SessionStore.savedjango/contrib/sessions/backends/db.py:1262 ms1.7%
Atomic.__exit__django/db/transaction.py:2592 ms1.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms1.7%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4312 ms1.7%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3752 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms1.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms1.7%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms1.7%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()6 ms5.1%
TestCase._fixture_teardowndjango/test/testcases.py:14986 ms5.1%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4956 ms5.1%
CursorWrapper.executedjango/db/backends/utils.py:796 ms5.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:926 ms5.1%
CursorWrapper._executedjango/db/backends/utils.py:1036 ms5.1%
Cursor.executepsycopg/cursor.py:1136 ms5.1%
Connection.waitpsycopg/connection.py:4956 ms5.1%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms1.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms1.7%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms1.7%
TestToggleStarterPackAccount.test_add_accountstarter_packs/tests.py:363 account = baker.make("accounts.Account", discoverable=True)2 ms1.7%
makemodel_bakery/baker.py:1752 ms1.7%
Baker.makemodel_bakery/baker.py:4542 ms1.7%
Baker._makemodel_bakery/baker.py:5422 ms1.7%
Baker.instancemodel_bakery/baker.py:6592 ms1.7%
Model.savedjango/db/models/base.py:9042 ms1.7%
Model.save_basedjango/db/models/base.py:9962 ms1.7%
Model._save_tabledjango/db/models/base.py:11992 ms1.7%
Model._do_insertdjango/db/models/base.py:12512 ms1.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms1.7%
QuerySet._insertdjango/db/models/query.py:21412 ms1.7%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19362 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms1.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms1.7%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms1.7%
TestToggleStarterPackAccount.test_add_accountstarter_packs/tests.py:375 ).exists()2 ms1.7%
QuerySet.existsdjango/db/models/query.py:14582 ms1.7%
Query.has_resultsdjango/db/models/sql/query.py:6872 ms1.7%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15932 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16252 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
Estimated from 71 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
starter_packs/tests.py:365
response = self.client.post(
TestToggleStarterPackAccount.test_add_account
· Libraries
|
40 ms |
|
starter_packs/tests.py:364
self.client.force_login(self.user)
TestToggleStarterPackAccount.test_add_account
· Database
|
18 ms |
|
starter_packs/splash_images.py:77
return list(accounts)
get_splash_image_accounts
· Database
|
12 ms |
|
starter_packs/tests.py:358
baker.make("mastodon_auth.AccountAccess", user=cls.user)
TestToggleStarterPackAccount.setUpTestData
· Database
|
8 ms |
|
starter_packs/views.py:60
return get_object_or_404(StarterPack, slug=slug, owners=request.user, **extra)
get_editable_pack
· Database
|
6 ms |
|
starter_packs/tests.py:357
cls.user = baker.make("auth.User")
TestToggleStarterPackAccount.setUpTestData
· Database
|
5 ms |
|
starter_packs/tests.py:359
cls.starter_pack = baker.make("starter_packs.StarterPack", created_by=cls.user)
TestToggleStarterPackAccount.setUpTestData
· Database
|
2 ms |
|
starter_packs/tests.py:363
account = baker.make("accounts.Account", discoverable=True)
TestToggleStarterPackAccount.test_add_account
· Database
|
2 ms |
|
starter_packs/views.py:619
starter_pack = get_object_or_404(StarterPack.objects.select_for_update(), pk=editable.pk)
toggle_account_to_starter_pack
· Database
|
2 ms |
|
starter_packs/views.py:620
account = get_object_or_404(Account, id=account_id)
toggle_account_to_starter_pack
· Database
|
2 ms |
Fixtures
Exact setup time| _unittest_setUpClass_fixture_TestToggleStarterPackAccount class | 25 ms |
| _django_setup_unittest class | 0.28 ms |
| _dj_autoclear_mailbox function | 0.04 ms |
| _django_db_marker function | 0.03 ms |
| _template_string_if_invalid_marker function | 0.03 ms |
| _django_isolate_apps function | 0.02 ms |
| _live_server_helper function | 0.02 ms |
| _django_set_urlconf function | 0.02 ms |
| _django_clear_site_cache function | 0.02 ms |
| monkeypatch function | 0.01 ms |
Database
42 queries · 35 msNo repeated queries.
Biggest pieces of work
|
call test body
starter_packs/tests.py:365
|
86 ms |
|
setup setUpClass
django/test/testcases.py:1426
|
24 ms |
|
call _post_teardown
django/test/testcases.py:1243
|
6 ms |
| setup pytest internals | 1 ms |
Reliability
5 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 50 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 7 hours ago | CI github-actions:test | passed | 119 ms | Profile |
| 8 hours ago | CI github-actions:test | passed | 339 ms | Profile |
| 8 hours ago | CI github-actions:test | passed | 311 ms | Profile |
| 13 hours ago | CI github-actions:test | passed | 288 ms | Profile |
| 13 hours ago | CI github-actions:test | passed | 114 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 70 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 95 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 97 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 107 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 95 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 108 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 95 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 102 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 149 ms | Run |
| 3 months, 4 weeks ago | CI github-actions | passed | 111 ms | Run |
| 3 months, 4 weeks ago | CI github-actions | passed | 105 ms | Run |
| 3 months, 4 weeks ago | CI github-actions | passed | 108 ms | Run |
| 3 months, 4 weeks ago | CI github-actions | passed | 103 ms | Run |
| 3 months, 4 weeks ago | CI github-actions | passed | 114 ms | Run |
| 3 months, 4 weeks ago | CI github-actions | passed | 106 ms | Run |