flakytest.dev anze3db fedidevs
Tests / starter_packs/tests.py

TestPinAccountInStarterPack::test_toggle_pin_and_unpin

First seen 1 month, 1 week ago in 0c23747
CI github-actions:test 13 runs
Average
146 ms
median 107 ms
max 361 ms
Phases
Setup 7 ms Call 138 ms Teardown 0.78 ms
Categories
Database 49 ms Factories 0.22 ms Other (Libraries, pytest, Templates, Unsampled, ...) 97 ms

34 database queries per run

Needs 143 KB of memory (max 856 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 2 weeks ago · open run
Show pytest frames
call105 ms98.7%
TestPinAccountInStarterPack.test_toggle_pin_and_unpinstarter_packs/tests.py:1043 response = self.client.post(self.pin_url(self.niche))80 ms75.3%
Client.postdjango/test/client.py:116280 ms75.3%
RequestFactory.postdjango/test/client.py:49980 ms75.3%
RequestFactory.genericdjango/test/client.py:67180 ms75.3%
Client.requestdjango/test/client.py:109180 ms75.3%
ClientHandler.__call__django/test/client.py:17363 ms58.7%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6363 ms58.7%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10463 ms58.7%
WhiteNoise.add_fileswhitenoise/base.py:10863 ms58.7%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12050 ms46.9%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13149 ms45.9%
WhiteNoise.get_static_filewhitenoise/base.py:21733 ms31.3%
StaticFile.__init__whitenoise/responders.py:7310 ms9.8%
StaticFile.get_headerswhitenoise/responders.py:1784 ms3.9%
parsedate<stdlib>/email/_parseaddr.py:1853 ms2.9%
parsedate_tz<stdlib>/email/_parseaddr.py:503 ms2.9%
_parsedate_tz<stdlib>/email/_parseaddr.py:1053 ms2.9%
Headers.__getitem__<stdlib>/wsgiref/headers.py:831 ms1.0%
Headers.get<stdlib>/wsgiref/headers.py:1051 ms1.0%
StaticFile.get_headerswhitenoise/responders.py:1764 ms3.9%
formatdate<stdlib>/email/utils.py:2664 ms3.9%
format_datetime<stdlib>/email/utils.py:2752 ms2.0%
format_datetime<stdlib>/email/utils.py:2842 ms2.0%
_format_timetuple_and_zone<stdlib>/email/utils.py:2312 ms2.0%
StaticFile.get_headerswhitenoise/responders.py:1702 ms2.0%
Headers.__setitem__<stdlib>/wsgiref/headers.py:622 ms2.0%
Headers.__delitem__<stdlib>/wsgiref/headers.py:712 ms2.0%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:482 ms2.0%
StaticFile.__init__whitenoise/responders.py:777 ms6.8%
StaticFile.get_alternativeswhitenoise/responders.py:2004 ms3.9%
__init____init__:-14 ms3.9%
Headers.__init__<stdlib>/wsgiref/headers.py:433 ms2.9%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:502 ms2.0%
Headers.__init__<stdlib>/wsgiref/headers.py:441 ms1.0%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:461 ms1.0%
StaticFile.get_alternativeswhitenoise/responders.py:2012 ms2.0%
Headers.__setitem__<stdlib>/wsgiref/headers.py:621 ms1.0%
Headers.__delitem__<stdlib>/wsgiref/headers.py:721 ms1.0%
StaticFile.get_alternativeswhitenoise/responders.py:1981 ms1.0%
StaticFile.__init__whitenoise/responders.py:766 ms5.9%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1872 ms2.0%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1902 ms2.0%
Response.__init__whitenoise/responders.py:191 ms1.0%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1882 ms2.0%
Headers.__contains__<stdlib>/wsgiref/headers.py:872 ms2.0%
Headers.get<stdlib>/wsgiref/headers.py:1041 ms1.0%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:501 ms1.0%
Headers.get<stdlib>/wsgiref/headers.py:1051 ms1.0%
StaticFile.__init__whitenoise/responders.py:726 ms5.9%
StaticFile.get_file_statswhitenoise/responders.py:1616 ms5.9%
__init____init__:-16 ms5.9%
FileEntry.__init__whitenoise/responders.py:2636 ms5.9%
FileEntry.stat_regular_filewhitenoise/responders.py:2766 ms5.9%
<GC>~5 ms4.9%
StaticFile.__init__whitenoise/responders.py:742 ms2.0%
Headers.__getitem__<stdlib>/wsgiref/headers.py:832 ms2.0%
Headers.get<stdlib>/wsgiref/headers.py:1071 ms1.0%
Headers.get<stdlib>/wsgiref/headers.py:1061 ms1.0%
StaticFile.__init__whitenoise/responders.py:751 ms1.0%
Headers.__getitem__<stdlib>/wsgiref/headers.py:831 ms1.0%
Headers.get<stdlib>/wsgiref/headers.py:1041 ms1.0%
WhiteNoise.get_static_filewhitenoise/base.py:2127 ms6.8%
WhiteNoise.add_cache_headerswhitenoise/base.py:2334 ms3.9%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1763 ms2.9%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1973 ms2.9%
URLMixin.urldebug_toolbar/panels/staticfiles.py:203 ms2.9%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2353 ms2.9%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2162 ms2.0%
FileSystemStorage.urldjango/core/files/storage/filesystem.py:2041 ms1.0%
filepath_to_uridjango/utils/encoding.py:2451 ms1.0%
quote<stdlib>/urllib/parse.py:10721 ms1.0%
quote_from_bytes<stdlib>/urllib/parse.py:11111 ms1.0%
FileSystemStorage.urldjango/core/files/storage/filesystem.py:2071 ms1.0%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2141 ms1.0%
ManifestFilesMixin.stored_namedjango/contrib/staticfiles/storage.py:6111 ms1.0%
urlunsplit<stdlib>/urllib/parse.py:6651 ms1.0%
_coerce_args<stdlib>/urllib/parse.py:1301 ms1.0%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1731 ms1.0%
WhiteNoiseMiddleware.get_name_without_hashwhitenoise/middleware.py:1931 ms1.0%
WhiteNoise.add_cache_headerswhitenoise/base.py:2343 ms2.9%
Headers.__setitem__<stdlib>/wsgiref/headers.py:642 ms2.0%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:482 ms2.0%
WhiteNoise.get_static_filewhitenoise/base.py:2115 ms4.9%
WhiteNoise.add_mime_headerswhitenoise/base.py:2253 ms2.9%
MediaTypes.get_typewhitenoise/media_types.py:192 ms2.0%
splitext<frozen posixpath>:1192 ms2.0%
MediaTypes.get_typewhitenoise/media_types.py:161 ms1.0%
WhiteNoise.add_mime_headerswhitenoise/base.py:2302 ms2.0%
Headers.add_header<stdlib>/wsgiref/headers.py:1901 ms1.0%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:521 ms1.0%
Headers.add_header<stdlib>/wsgiref/headers.py:1651 ms1.0%
WhiteNoise.get_static_filewhitenoise/base.py:2142 ms2.0%
Headers.__setitem__<stdlib>/wsgiref/headers.py:622 ms2.0%
Headers.__delitem__<stdlib>/wsgiref/headers.py:721 ms1.0%
Headers.__delitem__<stdlib>/wsgiref/headers.py:711 ms1.0%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:501 ms1.0%
WhiteNoise.get_static_filewhitenoise/base.py:2101 ms1.0%
__init____init__:-11 ms1.0%
Headers.__init__<stdlib>/wsgiref/headers.py:401 ms1.0%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1231 ms1.0%
WhiteNoise.is_compressed_variantwhitenoise/base.py:1981 ms1.0%
WhiteNoise.update_files_dictionarywhitenoise/base.py:11513 ms11.7%
scantreewhitenoise/base.py:27113 ms11.7%
scantreewhitenoise/base.py:27113 ms11.7%
scantreewhitenoise/base.py:27313 ms11.7%
ClientHandler.__call__django/test/client.py:18618 ms16.6%
BaseHandler.get_responsedjango/core/handlers/base.py:14218 ms16.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms16.6%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms16.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms16.6%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms16.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms16.6%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms16.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms16.6%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12318 ms16.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms16.6%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14518 ms16.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms16.6%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms16.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms16.6%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms16.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms16.6%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms14.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms14.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms14.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms14.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms14.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms14.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms14.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms14.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms14.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms14.7%
BaseHandler._get_responsedjango/core/handlers/base.py:19916 ms14.7%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:6213 ms11.7%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:6313 ms11.7%
toggle_pin_in_starter_packstarter_packs/views.py:899 .first()5 ms4.9%
QuerySet.firstdjango/db/models/query.py:12125 ms4.9%
QuerySet.__iter__django/db/models/query.py:4395 ms4.9%
QuerySet._fetch_alldjango/db/models/query.py:22625 ms4.9%
ModelIterable.__iter__django/db/models/query.py:1035 ms4.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16255 ms4.9%
CursorWrapper.executedjango/db/backends/utils.py:795 ms4.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:925 ms4.9%
CursorWrapper._executedjango/db/backends/utils.py:1055 ms4.9%
Cursor.executepsycopg/cursor.py:1135 ms4.9%
Connection.waitpsycopg/connection.py:4955 ms4.9%
toggle_pin_in_starter_packstarter_packs/views.py:8954 ms3.9%
get_editable_packstarter_packs/views.py:60 return get_object_or_404(StarterPack, slug=slug, owners=request.user, **extra)4 ms3.9%
get_object_or_404django/shortcuts.py:1004 ms3.9%
QuerySet.getdjango/db/models/query.py:7023 ms2.9%
QuerySet.__len__django/db/models/query.py:4213 ms2.9%
QuerySet._fetch_alldjango/db/models/query.py:22623 ms2.9%
ModelIterable.__iter__django/db/models/query.py:1032 ms2.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16252 ms2.0%
CursorWrapper.executedjango/db/backends/utils.py:792 ms2.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms2.0%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms2.0%
Cursor.executepsycopg/cursor.py:1132 ms2.0%
Connection.waitpsycopg/connection.py:4952 ms2.0%
ModelIterable.__iter__django/db/models/query.py:991 ms1.0%
Query.get_compilerdjango/db/models/sql/query.py:3741 ms1.0%
BaseConnectionHandler.__getitem__django/utils/connection.py:581 ms1.0%
Local.__getattr__asgiref/local.py:1581 ms1.0%
QuerySet.getdjango/db/models/query.py:6921 ms1.0%
QuerySet.filterdjango/db/models/query.py:16761 ms1.0%
QuerySet._filter_or_excludedjango/db/models/query.py:16941 ms1.0%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:17041 ms1.0%
Query.add_qdjango/db/models/sql/query.py:16811 ms1.0%
Query._add_qdjango/db/models/sql/query.py:17091 ms1.0%
__init____init__:-11 ms1.0%
JoinPromoter.__init__django/db/models/sql/query.py:28281 ms1.0%
toggle_pin_in_starter_packstarter_packs/views.py:917 elif StarterPackAccount.objects.filter(starter_pack=starter_pack, pinned=True).count() >= MAX_PINNED_ACCOUNTS:2 ms2.0%
QuerySet.countdjango/db/models/query.py:6772 ms2.0%
Query.get_countdjango/db/models/sql/query.py:6572 ms2.0%
Query.get_aggregationdjango/db/models/sql/query.py:6392 ms2.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16252 ms2.0%
CursorWrapper.executedjango/db/backends/utils.py:792 ms2.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms2.0%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms2.0%
Cursor.executepsycopg/cursor.py:1132 ms2.0%
Connection.waitpsycopg/connection.py:4952 ms2.0%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms2.0%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms2.0%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms2.0%
toggle_pin_in_starter_packstarter_packs/views.py:921 starter_pack_account.save(update_fields=["pinned"])1 ms1.0%
Model.savedjango/db/models/base.py:9041 ms1.0%
Model.save_basedjango/db/models/base.py:9961 ms1.0%
Model._save_tabledjango/db/models/base.py:11401 ms1.0%
Model._do_updatedjango/db/models/base.py:12441 ms1.0%
QuerySet._updatedjango/db/models/query.py:14481 ms1.0%
SQLUpdateCompiler.execute_returning_sqldjango/db/models/sql/compiler.py:21501 ms1.0%
SQLUpdateCompiler.execute_sqldjango/db/models/sql/compiler.py:21211 ms1.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16251 ms1.0%
CursorWrapper.executedjango/db/backends/utils.py:791 ms1.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms1.0%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms1.0%
Cursor.executepsycopg/cursor.py:1131 ms1.0%
Connection.waitpsycopg/connection.py:4951 ms1.0%
BaseCursor._execute_genpsycopg/_cursor_base.py:2051 ms1.0%
BaseCursor._convert_querypsycopg/_cursor_base.py:4651 ms1.0%
PostgresClientQuery.convertpsycopg/_queries.py:2841 ms1.0%
_query2pg_client_nocachepsycopg/_queries.py:3291 ms1.0%
_split_querypsycopg/_queries.py:4251 ms1.0%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:593 ms2.9%
login_required.<locals>.<lambda>django/contrib/auth/decorators.py:823 ms2.9%
new_method_proxy.<locals>.innerdjango/utils/functional.py:2513 ms2.9%
SimpleLazyObject._setupdjango/utils/functional.py:4043 ms2.9%
AuthenticationMiddleware.process_request.<locals>.<lambda>django/contrib/auth/middleware.py:393 ms2.9%
get_userdjango/contrib/auth/middleware.py:193 ms2.9%
get_userdjango/contrib/auth/__init__.py:2942 ms2.0%
ModelBackend.get_userdjango/contrib/auth/backends.py:2372 ms2.0%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms2.0%
QuerySet.getdjango/db/models/query.py:7022 ms2.0%
QuerySet.__len__django/db/models/query.py:4212 ms2.0%
QuerySet._fetch_alldjango/db/models/query.py:22622 ms2.0%
ModelIterable.__iter__django/db/models/query.py:1032 ms2.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16252 ms2.0%
CursorWrapper.executedjango/db/backends/utils.py:792 ms2.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms2.0%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms2.0%
Cursor.executepsycopg/cursor.py:1132 ms2.0%
Connection.waitpsycopg/connection.py:4952 ms2.0%
get_userdjango/contrib/auth/__init__.py:2871 ms1.0%
_get_user_session_keydjango/contrib/auth/__init__.py:1111 ms1.0%
SessionBase.__getitem__django/contrib/sessions/backends/base.py:551 ms1.0%
SessionBase._get_sessiondjango/contrib/sessions/backends/base.py:2541 ms1.0%
SessionStore.loaddjango/contrib/sessions/backends/db.py:551 ms1.0%
SessionStore._get_session_from_dbdjango/contrib/sessions/backends/db.py:341 ms1.0%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms1.0%
QuerySet.getdjango/db/models/query.py:7021 ms1.0%
QuerySet.__len__django/db/models/query.py:4211 ms1.0%
QuerySet._fetch_alldjango/db/models/query.py:22621 ms1.0%
ModelIterable.__iter__django/db/models/query.py:1031 ms1.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16251 ms1.0%
CursorWrapper.executedjango/db/backends/utils.py:791 ms1.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms1.0%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms1.0%
Cursor.executepsycopg/cursor.py:1131 ms1.0%
Connection.waitpsycopg/connection.py:4951 ms1.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3792 ms2.0%
CommonMiddleware.process_requestdjango/middleware/common.py:482 ms2.0%
HttpRequest.get_hostdjango/http/request.py:1922 ms2.0%
HttpRequest._get_raw_hostdjango/http/request.py:1842 ms2.0%
TestPinAccountInStarterPack.test_toggle_pin_and_unpinstarter_packs/tests.py:1048 response = self.client.post(self.pin_url(self.niche))10 ms9.8%
Client.postdjango/test/client.py:116210 ms9.8%
RequestFactory.postdjango/test/client.py:49910 ms9.8%
RequestFactory.genericdjango/test/client.py:67110 ms9.8%
Client.requestdjango/test/client.py:109110 ms9.8%
ClientHandler.__call__django/test/client.py:18610 ms9.8%
BaseHandler.get_responsedjango/core/handlers/base.py:14210 ms9.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms9.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms9.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms9.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms9.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms9.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms9.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms9.8%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12310 ms9.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms9.8%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14510 ms9.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms9.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms9.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms9.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms9.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms9.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms9.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms9.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms9.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms9.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms9.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms9.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms9.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms9.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms9.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms9.8%
BaseHandler._get_responsedjango/core/handlers/base.py:19910 ms9.8%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:626 ms5.9%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:636 ms5.9%
toggle_pin_in_starter_packstarter_packs/views.py:899 .first()4 ms3.9%
QuerySet.firstdjango/db/models/query.py:12124 ms3.9%
QuerySet.__iter__django/db/models/query.py:4394 ms3.9%
QuerySet._fetch_alldjango/db/models/query.py:22624 ms3.9%
ModelIterable.__iter__django/db/models/query.py:1034 ms3.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16254 ms3.9%
CursorWrapper.executedjango/db/backends/utils.py:794 ms3.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:924 ms3.9%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms2.9%
Cursor.executepsycopg/cursor.py:1133 ms2.9%
Connection.waitpsycopg/connection.py:4953 ms2.9%
BaseCursor._execute_genpsycopg/_cursor_base.py:2063 ms2.9%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2863 ms2.9%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:783 ms2.9%
toggle_pin_in_starter_packstarter_packs/views.py:8951 ms1.0%
get_editable_packstarter_packs/views.py:60 return get_object_or_404(StarterPack, slug=slug, owners=request.user, **extra)1 ms1.0%
get_object_or_404django/shortcuts.py:1001 ms1.0%
QuerySet.getdjango/db/models/query.py:7021 ms1.0%
QuerySet.__len__django/db/models/query.py:4211 ms1.0%
QuerySet._fetch_alldjango/db/models/query.py:22621 ms1.0%
ModelIterable.__iter__django/db/models/query.py:1031 ms1.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16231 ms1.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:261 ms1.0%
BaseDatabaseWrapper.cursordjango/db/backends/base/base.py:3201 ms1.0%
BaseDatabaseWrapper._cursordjango/db/backends/base/base.py:2981 ms1.0%
toggle_pin_in_starter_packstarter_packs/views.py:898 .filter(starter_pack=starter_pack, account_id=account_id)1 ms1.0%
QuerySet.filterdjango/db/models/query.py:16761 ms1.0%
QuerySet._filter_or_excludedjango/db/models/query.py:16941 ms1.0%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:17041 ms1.0%
Query.add_qdjango/db/models/sql/query.py:16811 ms1.0%
Query._add_qdjango/db/models/sql/query.py:17131 ms1.0%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:594 ms3.9%
login_required.<locals>.<lambda>django/contrib/auth/decorators.py:824 ms3.9%
new_method_proxy.<locals>.innerdjango/utils/functional.py:2514 ms3.9%
SimpleLazyObject._setupdjango/utils/functional.py:4044 ms3.9%
AuthenticationMiddleware.process_request.<locals>.<lambda>django/contrib/auth/middleware.py:394 ms3.9%
get_userdjango/contrib/auth/middleware.py:194 ms3.9%
get_userdjango/contrib/auth/__init__.py:2944 ms3.9%
ModelBackend.get_userdjango/contrib/auth/backends.py:2374 ms3.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:874 ms3.9%
QuerySet.getdjango/db/models/query.py:7024 ms3.9%
QuerySet.__len__django/db/models/query.py:4214 ms3.9%
QuerySet._fetch_alldjango/db/models/query.py:22624 ms3.9%
ModelIterable.__iter__django/db/models/query.py:1034 ms3.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16254 ms3.9%
CursorWrapper.executedjango/db/backends/utils.py:794 ms3.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:924 ms3.9%
CursorWrapper._executedjango/db/backends/utils.py:1054 ms3.9%
Cursor.executepsycopg/cursor.py:1134 ms3.9%
Connection.waitpsycopg/connection.py:4954 ms3.9%
TestPinAccountInStarterPack.test_toggle_pin_and_unpinstarter_packs/tests.py:1041 self.client.force_login(self.owner)5 ms4.9%
ClientMixin.force_logindjango/test/client.py:8585 ms4.9%
ClientMixin._logindjango/test/client.py:8894 ms3.9%
logindjango/contrib/auth/__init__.py:1772 ms2.0%
SessionBase.__contains__django/contrib/sessions/backends/base.py:522 ms2.0%
SessionBase._get_sessiondjango/contrib/sessions/backends/base.py:2542 ms2.0%
SessionStore.loaddjango/contrib/sessions/backends/db.py:551 ms1.0%
SessionStore._get_session_from_dbdjango/contrib/sessions/backends/db.py:341 ms1.0%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms1.0%
QuerySet.getdjango/db/models/query.py:6921 ms1.0%
QuerySet.filterdjango/db/models/query.py:16761 ms1.0%
QuerySet._filter_or_excludedjango/db/models/query.py:16941 ms1.0%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:17041 ms1.0%
Query.add_qdjango/db/models/sql/query.py:16811 ms1.0%
Query._add_qdjango/db/models/sql/query.py:17131 ms1.0%
Query.build_filterdjango/db/models/sql/query.py:15771 ms1.0%
Query.setup_joinsdjango/db/models/sql/query.py:19421 ms1.0%
SessionStore.loaddjango/contrib/sessions/backends/db.py:561 ms1.0%
logindjango/contrib/auth/__init__.py:1892 ms2.0%
SessionBase.cycle_keydjango/contrib/sessions/backends/base.py:4372 ms2.0%
SessionStore.createdjango/contrib/sessions/backends/db.py:701 ms1.0%
SessionBase._get_new_session_keydjango/contrib/sessions/backends/base.py:2011 ms1.0%
SessionStore.existsdjango/contrib/sessions/backends/db.py:631 ms1.0%
QuerySet.existsdjango/db/models/query.py:14581 ms1.0%
Query.has_resultsdjango/db/models/sql/query.py:6871 ms1.0%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15931 ms1.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16251 ms1.0%
CursorWrapper.executedjango/db/backends/utils.py:791 ms1.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms1.0%
SessionStore.createdjango/contrib/sessions/backends/db.py:741 ms1.0%
SessionStore.savedjango/contrib/sessions/backends/db.py:1271 ms1.0%
Model.savedjango/db/models/base.py:9041 ms1.0%
Model.save_basedjango/db/models/base.py:9961 ms1.0%
Model._save_tabledjango/db/models/base.py:11991 ms1.0%
Model._do_insertdjango/db/models/base.py:12511 ms1.0%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms1.0%
QuerySet._insertdjango/db/models/query.py:21411 ms1.0%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19361 ms1.0%
CursorWrapper.executedjango/db/backends/utils.py:791 ms1.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms1.0%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms1.0%
Cursor.executepsycopg/cursor.py:1131 ms1.0%
Connection.waitpsycopg/connection.py:4951 ms1.0%
ClientMixin._logindjango/test/client.py:8841 ms1.0%
ClientMixin.sessiondjango/test/client.py:8151 ms1.0%
SessionStore.savedjango/contrib/sessions/backends/db.py:1211 ms1.0%
SessionStore.createdjango/contrib/sessions/backends/db.py:701 ms1.0%
SessionBase._get_new_session_keydjango/contrib/sessions/backends/base.py:2001 ms1.0%
get_random_stringdjango/utils/crypto.py:781 ms1.0%
get_random_string.<locals>.<genexpr>django/utils/crypto.py:781 ms1.0%
Random.choice<stdlib>/random.py:3541 ms1.0%
Random._randbelow_with_getrandbits<stdlib>/random.py:2511 ms1.0%
SystemRandom.getrandbits<stdlib>/random.py:9151 ms1.0%
TestPinAccountInStarterPack.test_toggle_pin_and_unpinstarter_packs/tests.py:1045 self.assertTrue(StarterPackAccount.objects.get(starter_pack=self.starter_pack, account=self.niche).pinned)3 ms2.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms2.9%
QuerySet.getdjango/db/models/query.py:6922 ms2.0%
QuerySet.filterdjango/db/models/query.py:16762 ms2.0%
QuerySet._filter_or_excludedjango/db/models/query.py:16942 ms2.0%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:17042 ms2.0%
Query.add_qdjango/db/models/sql/query.py:16812 ms2.0%
Query._add_qdjango/db/models/sql/query.py:17132 ms2.0%
Query.build_filterdjango/db/models/sql/query.py:15662 ms2.0%
Query.check_filterabledjango/db/models/sql/query.py:14112 ms2.0%
QuerySet.getdjango/db/models/query.py:7021 ms1.0%
QuerySet.__len__django/db/models/query.py:4211 ms1.0%
QuerySet._fetch_alldjango/db/models/query.py:22621 ms1.0%
ModelIterable.__iter__django/db/models/query.py:1031 ms1.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16251 ms1.0%
CursorWrapper.executedjango/db/backends/utils.py:791 ms1.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms1.0%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms1.0%
Cursor.executepsycopg/cursor.py:1131 ms1.0%
Connection.waitpsycopg/connection.py:4951 ms1.0%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms1.0%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms1.0%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms1.0%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()3 ms2.9%
TestCase._fixture_teardowndjango/test/testcases.py:14982 ms2.0%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4951 ms1.0%
CursorWrapper.executedjango/db/backends/utils.py:791 ms1.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms1.0%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms1.0%
Cursor.executepsycopg/cursor.py:1131 ms1.0%
Connection.waitpsycopg/connection.py:4951 ms1.0%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4961 ms1.0%
CursorWrapper.executedjango/db/backends/utils.py:791 ms1.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms1.0%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms1.0%
Cursor.executepsycopg/cursor.py:1131 ms1.0%
Connection.waitpsycopg/connection.py:4951 ms1.0%
TestCase._fixture_teardowndjango/test/testcases.py:15001 ms1.0%
TestCase._rollback_atomicsdjango/test/testcases.py:14081 ms1.0%
Atomic.__exit__django/db/transaction.py:2951 ms1.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:261 ms1.0%
BaseDatabaseWrapper.savepoint_rollbackdjango/db/backends/base/base.py:4131 ms1.0%
BaseDatabaseWrapper._savepoint_rollbackdjango/db/backends/base/base.py:3711 ms1.0%
CursorWrapper.executedjango/db/backends/utils.py:791 ms1.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms1.0%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms1.0%
Cursor.executepsycopg/cursor.py:1131 ms1.0%
Connection.waitpsycopg/connection.py:4951 ms1.0%
TransactionTestCase._pre_setupdjango/test/testcases.py:1154 super()._pre_setup()1 ms1.0%
SimpleTestCase._pre_setupdjango/test/testcases.py:3861 ms1.0%
TestPinAccountInStarterPack.test_toggle_pin_and_unpinstarter_packs/tests.py:1050 self.assertFalse(StarterPackAccount.objects.get(starter_pack=self.starter_pack, account=self.niche).pinned)1 ms1.0%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms1.0%
QuerySet.getdjango/db/models/query.py:7021 ms1.0%
QuerySet.__len__django/db/models/query.py:4211 ms1.0%
QuerySet._fetch_alldjango/db/models/query.py:22621 ms1.0%
ModelIterable.__iter__django/db/models/query.py:1031 ms1.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16251 ms1.0%
CursorWrapper.executedjango/db/backends/utils.py:791 ms1.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms1.0%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms1.0%
Cursor.executepsycopg/cursor.py:1131 ms1.0%
Connection.waitpsycopg/connection.py:4951 ms1.0%
Estimated from 101 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

starter_packs/tests.py:1043
response = self.client.post(self.pin_url(self.niche))
TestPinAccountInStarterPack.test_toggle_pin_and_unpin · Libraries
68 ms
starter_packs/views.py:899
.first()
toggle_pin_in_starter_pack · Database
9 ms
starter_packs/views.py:60
return get_object_or_404(StarterPack, slug=slug, owners=request.user, **extra)
get_editable_pack · Database
5 ms
starter_packs/tests.py:1041
self.client.force_login(self.owner)
TestPinAccountInStarterPack.test_toggle_pin_and_unpin · Database
5 ms
starter_packs/tests.py:1048
response = self.client.post(self.pin_url(self.niche))
TestPinAccountInStarterPack.test_toggle_pin_and_unpin · Database
4 ms
starter_packs/tests.py:1045
self.assertTrue(StarterPackAccount.objects.get(starter_pack=self.starter_pack, account=self.niche).pinned)
TestPinAccountInStarterPack.test_toggle_pin_and_unpin · Database
3 ms
starter_packs/views.py:917
elif StarterPackAccount.objects.filter(starter_pack=starter_pack, pinned=True).count() >= MAX_PINNED_ACCOUNTS:
toggle_pin_in_starter_pack · Database
2 ms
starter_packs/views.py:921
starter_pack_account.save(update_fields=["pinned"])
toggle_pin_in_starter_pack · Database
1 ms
starter_packs/views.py:898
.filter(starter_pack=starter_pack, account_id=account_id)
toggle_pin_in_starter_pack · Database
1 ms
starter_packs/tests.py:1050
self.assertFalse(StarterPackAccount.objects.get(starter_pack=self.starter_pack, account=self.niche).pinned)
TestPinAccountInStarterPack.test_toggle_pin_and_unpin · Database
1 ms

Fixtures

Exact setup time
_dj_autoclear_mailbox function 0.05 ms
_template_string_if_invalid_marker function 0.04 ms
_django_db_marker function 0.04 ms
_django_clear_site_cache function 0.03 ms
_django_isolate_apps function 0.03 ms
_django_set_urlconf function 0.03 ms
_live_server_helper function 0.03 ms
monkeypatch function 0.02 ms

Database

33 queries · 26 ms

Repeated queries are usually N+1 lookups: fetch them once with select_related / prefetch_related (or selectinload).

3×
SELECT "django_session"."session_key", "django_session"."session_data", "django_session"."expire_date" FROM "django_session" WHERE ("django_session"."expire_date" > %s AND "django_session"."session_key" = %s) LIMIT ?

Biggest pieces of work

call test body
starter_packs/tests.py:1043
100 ms
call _post_teardown
django/test/testcases.py:1243
3 ms
call pytest internals 1 ms
call _pre_setup
django/test/testcases.py:1154
1 ms

Reliability

14 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 14 results, oldest first in the strip
When Environment Outcome Duration Commit
2 weeks ago CI github-actions:test passed 107 ms 28600ed main Profile
2 weeks, 5 days ago CI github-actions:test passed 232 ms 600b717 main Profile
2 weeks, 6 days ago CI github-actions:test passed 133 ms c28a326 main Profile
3 weeks ago CI github-actions:test passed 98 ms 9b8826a main Profile
3 weeks ago CI github-actions:test passed 119 ms 4f01055 main Profile
1 month ago CI github-actions:test passed 105 ms 8ab642e main Profile
1 month ago CI github-actions:test passed 89 ms 9b75244 main Profile
1 month ago CI github-actions:test passed 100 ms 9603516 main Profile
1 month, 1 week ago CI github-actions:test passed 88 ms 615a272 main Profile
1 month, 1 week ago CI github-actions:test passed 67 ms d923a46 main Profile
1 month, 1 week ago CI github-actions:test passed 361 ms 82997f8 main Profile
1 month, 1 week ago CI github-actions:test passed 114 ms 623aa3e main Profile
1 month, 1 week ago CI github-actions:test passed 289 ms ab6465a main Profile
1 month, 1 week ago CI github-actions:test passed 105 ms 0c23747 main Run