Tests / fedidevs/tests.py
TestAnonymousCacheAndCsrf::test_anonymous_html_is_publicly_cacheable_without_csrf_cookie
First seen 1 month, 1 week ago in 0c23747
CI
github-actions:test
13 runs
Average
138 ms
median 127 ms
max 335 ms
max 335 ms
Phases
Setup 1 ms
Call 101 ms
Teardown 36 ms
Categories
Database 11 ms
Test code 0.08 ms
Other (Libraries, DB schema, pytest, Templates, ...) 127 ms
7 database queries per run
Needs 359 KB of memory (max 1 MB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
setup1 ms1.7%
__init____init__:-11 ms1.7%
signature<stdlib>/inspect.py:33431 ms1.7%
Signature.from_callable<stdlib>/inspect.py:30581 ms1.7%
_signature_from_callable<stdlib>/inspect.py:25251 ms1.7%
call60 ms97.9%
TestAnonymousCacheAndCsrf.test_anonymous_html_is_publicly_cacheable_without_csrf_cookiefedidevs/tests.py:58 response = self.client.get("/login/")57 ms93.0%
Client.getdjango/test/client.py:113357 ms93.0%
RequestFactory.getdjango/test/client.py:47557 ms93.0%
RequestFactory.genericdjango/test/client.py:67157 ms93.0%
Client.requestdjango/test/client.py:109157 ms93.0%
ClientHandler.__call__django/test/client.py:17349 ms79.7%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6348 ms78.0%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10448 ms78.0%
WhiteNoise.add_fileswhitenoise/base.py:10848 ms78.0%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12042 ms68.1%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13142 ms68.1%
WhiteNoise.get_static_filewhitenoise/base.py:21729 ms46.5%
StaticFile.__init__whitenoise/responders.py:7312 ms19.9%
StaticFile.get_headerswhitenoise/responders.py:1764 ms6.6%
formatdate<stdlib>/email/utils.py:2664 ms6.6%
format_datetime<stdlib>/email/utils.py:2842 ms3.3%
_format_timetuple_and_zone<stdlib>/email/utils.py:2312 ms3.3%
format_datetime<stdlib>/email/utils.py:2752 ms3.3%
StaticFile.get_headerswhitenoise/responders.py:1784 ms6.6%
parsedate<stdlib>/email/_parseaddr.py:1854 ms6.6%
parsedate_tz<stdlib>/email/_parseaddr.py:503 ms5.0%
_parsedate_tz<stdlib>/email/_parseaddr.py:1011 ms1.7%
parsedate_tz<stdlib>/email/_parseaddr.py:511 ms1.7%
StaticFile.get_headerswhitenoise/responders.py:1672 ms3.3%
__init____init__:-12 ms3.3%
Headers.__init__<stdlib>/wsgiref/headers.py:431 ms1.7%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:501 ms1.7%
Headers.__init__<stdlib>/wsgiref/headers.py:421 ms1.7%
StaticFile.get_headerswhitenoise/responders.py:1702 ms3.3%
Headers.__setitem__<stdlib>/wsgiref/headers.py:621 ms1.7%
Headers.__delitem__<stdlib>/wsgiref/headers.py:711 ms1.7%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:481 ms1.7%
Headers.__setitem__<stdlib>/wsgiref/headers.py:641 ms1.7%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:501 ms1.7%
StaticFile.__init__whitenoise/responders.py:778 ms13.3%
StaticFile.get_alternativeswhitenoise/responders.py:2004 ms6.6%
__init____init__:-14 ms6.6%
Headers.__init__<stdlib>/wsgiref/headers.py:442 ms3.3%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:501 ms1.7%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:481 ms1.7%
Headers.__init__<stdlib>/wsgiref/headers.py:432 ms3.3%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:501 ms1.7%
StaticFile.get_alternativeswhitenoise/responders.py:1981 ms1.7%
StaticFile.get_alternativeswhitenoise/responders.py:2061 ms1.7%
compile<stdlib>/re/__init__.py:2911 ms1.7%
_compile<stdlib>/re/__init__.py:3371 ms1.7%
StaticFile.get_alternativeswhitenoise/responders.py:2041 ms1.7%
StaticFile.__init__whitenoise/responders.py:767 ms11.6%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1885 ms8.3%
Headers.__contains__<stdlib>/wsgiref/headers.py:875 ms8.3%
Headers.get<stdlib>/wsgiref/headers.py:1063 ms5.0%
Headers.get<stdlib>/wsgiref/headers.py:1041 ms1.7%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:501 ms1.7%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1891 ms1.7%
WhiteNoise.get_static_filewhitenoise/base.py:21210 ms16.6%
WhiteNoise.add_cache_headerswhitenoise/base.py:2339 ms14.9%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1769 ms14.9%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1979 ms14.9%
URLMixin.urldebug_toolbar/panels/staticfiles.py:209 ms14.9%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2357 ms11.6%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2164 ms6.6%
FileSystemStorage.urldjango/core/files/storage/filesystem.py:2074 ms6.6%
urljoin<stdlib>/urllib/parse.py:7432 ms3.3%
urljoin<stdlib>/urllib/parse.py:7091 ms1.7%
_urlsplit<stdlib>/urllib/parse.py:6241 ms1.7%
_checknetloc<stdlib>/urllib/parse.py:5101 ms1.7%
urljoin<stdlib>/urllib/parse.py:7051 ms1.7%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2142 ms3.3%
ManifestFilesMixin.stored_namedjango/contrib/staticfiles/storage.py:5952 ms3.3%
unquote<stdlib>/urllib/parse.py:8501 ms1.7%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2081 ms1.7%
urlsplit<stdlib>/urllib/parse.py:5821 ms1.7%
_urlsplit<stdlib>/urllib/parse.py:6061 ms1.7%
WhiteNoise.add_cache_headerswhitenoise/base.py:2341 ms1.7%
Headers.__setitem__<stdlib>/wsgiref/headers.py:641 ms1.7%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:491 ms1.7%
WhiteNoise.get_static_filewhitenoise/base.py:2141 ms1.7%
Headers.__setitem__<stdlib>/wsgiref/headers.py:641 ms1.7%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:501 ms1.7%
WhiteNoise.get_static_filewhitenoise/base.py:2101 ms1.7%
__init____init__:-11 ms1.7%
Headers.__init__<stdlib>/wsgiref/headers.py:371 ms1.7%
WhiteNoise.get_static_filewhitenoise/base.py:2111 ms1.7%
WhiteNoise.add_mime_headerswhitenoise/base.py:2251 ms1.7%
MediaTypes.get_typewhitenoise/media_types.py:201 ms1.7%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1155 ms8.3%
scantreewhitenoise/base.py:2715 ms8.3%
scantreewhitenoise/base.py:2714 ms6.6%
scantreewhitenoise/base.py:2733 ms5.0%
scantreewhitenoise/base.py:2711 ms1.7%
scantreewhitenoise/base.py:2711 ms1.7%
scantreewhitenoise/base.py:2711 ms1.7%
scantreewhitenoise/base.py:2731 ms1.7%
scantreewhitenoise/base.py:2731 ms1.7%
BaseHandler.load_middlewaredjango/core/handlers/base.py:561 ms1.7%
ClientHandler.__call__django/test/client.py:1868 ms13.3%
BaseHandler.get_responsedjango/core/handlers/base.py:1428 ms13.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:568 ms13.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3808 ms13.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:568 ms13.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3808 ms13.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:568 ms13.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3808 ms13.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:568 ms13.3%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1238 ms13.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:568 ms13.3%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1458 ms13.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:568 ms13.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3808 ms13.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:568 ms13.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3808 ms13.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:568 ms13.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3808 ms13.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:568 ms13.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3808 ms13.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:568 ms13.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3808 ms13.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:568 ms13.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3808 ms13.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:568 ms13.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3808 ms13.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:568 ms13.3%
BaseHandler._get_responsedjango/core/handlers/base.py:1998 ms13.3%
loginaccounts/views.py:280 return render(request, "login.html")8 ms13.3%
renderdjango/shortcuts.py:278 ms13.3%
render_to_stringdjango/template/loader.py:628 ms13.3%
Template.renderdjango/template/backends/django.py:1078 ms13.3%
Template.renderdjango/template/base.py:1758 ms13.3%
instrumented_test_renderdjango/test/utils.py:1138 ms13.3%
NodeList.renderdjango/template/base.py:11088 ms13.3%
Node.render_annotateddjango/template/base.py:10698 ms13.3%
ExtendsNode.renderdjango/template/loader_tags.py:1608 ms13.3%
instrumented_test_renderdjango/test/utils.py:1138 ms13.3%
NodeList.renderdjango/template/base.py:11088 ms13.3%
Node.render_annotateddjango/template/base.py:10698 ms13.3%
BlockNode.renderdjango/template/loader_tags.py:664 ms6.6%
NodeList.renderdjango/template/base.py:11084 ms6.6%
Node.render_annotateddjango/template/base.py:10694 ms6.6%
WithNode.renderdjango/template/defaulttags.py:5814 ms6.6%
NodeList.renderdjango/template/base.py:11084 ms6.6%
Node.render_annotateddjango/template/base.py:10694 ms6.6%
IncludeNode.renderdjango/template/loader_tags.py:2114 ms6.6%
Template.renderdjango/template/base.py:1774 ms6.6%
instrumented_test_renderdjango/test/utils.py:1134 ms6.6%
NodeList.renderdjango/template/base.py:11084 ms6.6%
Node.render_annotateddjango/template/base.py:10694 ms6.6%
SimpleNode.renderdjango/template/library.py:3433 ms5.0%
instances_datalistaccounts/templatetags/account_extras.py:36 for instance in instances:3 ms5.0%
QuerySet.__iter__django/db/models/query.py:4393 ms5.0%
QuerySet._fetch_alldjango/db/models/query.py:22623 ms5.0%
FlatValuesListIterable.__iter__django/db/models/query.py:3023 ms5.0%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15743 ms5.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16253 ms5.0%
CursorWrapper.executedjango/db/backends/utils.py:793 ms5.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms5.0%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms5.0%
Cursor.executepsycopg/cursor.py:1133 ms5.0%
Connection.waitpsycopg/connection.py:4953 ms5.0%
URLNode.renderdjango/template/defaulttags.py:4951 ms1.7%
IfNode.renderdjango/template/defaulttags.py:3332 ms3.3%
NodeList.renderdjango/template/base.py:11082 ms3.3%
Node.render_annotateddjango/template/base.py:10692 ms3.3%
IncludeNode.renderdjango/template/loader_tags.py:2112 ms3.3%
Template.renderdjango/template/base.py:1772 ms3.3%
instrumented_test_renderdjango/test/utils.py:1132 ms3.3%
NodeList.renderdjango/template/base.py:11082 ms3.3%
Node.render_annotateddjango/template/base.py:10692 ms3.3%
SimpleNode.renderdjango/template/library.py:3432 ms3.3%
instances_datalistaccounts/templatetags/account_extras.py:34 instances = Instance.objects.filter(deleted_at__isnull=True).values_list("domain", flat=True)2 ms3.3%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms3.3%
QuerySet.filterdjango/db/models/query.py:16762 ms3.3%
QuerySet._filter_or_excludedjango/db/models/query.py:16942 ms3.3%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:17041 ms1.7%
Query.add_qdjango/db/models/sql/query.py:16811 ms1.7%
Query._add_qdjango/db/models/sql/query.py:17131 ms1.7%
Query.build_filterdjango/db/models/sql/query.py:16131 ms1.7%
Query.build_lookupdjango/db/models/sql/query.py:14301 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16251 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:791 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms1.7%
Cursor.executepsycopg/cursor.py:1131 ms1.7%
Connection.waitpsycopg/connection.py:4951 ms1.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms1.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms1.7%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms1.7%
InclusionNode.renderdjango/template/library.py:4031 ms1.7%
Template.renderdjango/template/base.py:1771 ms1.7%
instrumented_test_renderdjango/test/utils.py:1131 ms1.7%
NodeList.renderdjango/template/base.py:11081 ms1.7%
Node.render_annotateddjango/template/base.py:10691 ms1.7%
IfNode.renderdjango/template/defaulttags.py:3331 ms1.7%
NodeList.renderdjango/template/base.py:11081 ms1.7%
Node.render_annotateddjango/template/base.py:10691 ms1.7%
StaticNode.renderdjango/templatetags/static.py:1161 ms1.7%
StaticNode.urldjango/templatetags/static.py:1131 ms1.7%
StaticNode.handle_simpledjango/templatetags/static.py:1291 ms1.7%
URLMixin.urldebug_toolbar/panels/staticfiles.py:201 ms1.7%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2351 ms1.7%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2161 ms1.7%
FileSystemStorage.urldjango/core/files/storage/filesystem.py:2071 ms1.7%
urljoin<stdlib>/urllib/parse.py:7301 ms1.7%
GetCurrentLanguageNode.renderdjango/templatetags/i18n.py:591 ms1.7%
get_languagedjango/utils/translation/__init__.py:2111 ms1.7%
get_languagedjango/utils/translation/trans_real.py:3291 ms1.7%
Local.__getattr__asgiref/local.py:1571 ms1.7%
contextmanager.<locals>.helper<stdlib>/contextlib.py:3671 ms1.7%
_GeneratorContextManagerBase.__init__<stdlib>/contextlib.py:1721 ms1.7%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()2 ms3.3%
TestCase._fixture_teardowndjango/test/testcases.py:14971 ms1.7%
TestCase._should_check_constraintsdjango/test/testcases.py:15061 ms1.7%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:5041 ms1.7%
Cursor.executepsycopg/cursor.py:1131 ms1.7%
Connection.waitpsycopg/connection.py:4951 ms1.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms1.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms1.7%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms1.7%
TestCase._fixture_teardowndjango/test/testcases.py:14981 ms1.7%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4961 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:791 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms1.7%
Cursor.executepsycopg/cursor.py:1131 ms1.7%
Connection.waitpsycopg/connection.py:4951 ms1.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms1.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms1.7%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms1.7%
TransactionTestCase._pre_setupdjango/test/testcases.py:1167 cls._fixture_setup()1 ms1.7%
TestCase._fixture_setupdjango/test/testcases.py:14811 ms1.7%
TestCase._enter_atomicsdjango/test/testcases.py:13991 ms1.7%
Atomic.__enter__django/db/transaction.py:2231 ms1.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:261 ms1.7%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4001 ms1.7%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3671 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:791 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms1.7%
Cursor.executepsycopg/cursor.py:1131 ms1.7%
Connection.waitpsycopg/connection.py:4951 ms1.7%
Estimated from 61 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
fedidevs/tests.py:58
response = self.client.get("/login/")
TestAnonymousCacheAndCsrf.test_anonymous_html_is_publicly_cacheable_without_csrf_cookie
· Libraries
|
49 ms |
|
accounts/templatetags/account_extras.py:36
for instance in instances:
instances_datalist
· Database
|
3 ms |
|
accounts/views.py:280
return render(request, "login.html")
login
· Templates
|
3 ms |
|
accounts/templatetags/account_extras.py:34
instances = Instance.objects.filter(deleted_at__isnull=True).values_list("domain", flat=True)
instances_datalist
· Database
|
2 ms |
Fixtures
Exact setup time| _dj_autoclear_mailbox function | 0.05 ms |
| _django_set_urlconf function | 0.05 ms |
| _template_string_if_invalid_marker function | 0.04 ms |
| _django_db_marker function | 0.04 ms |
| _live_server_helper function | 0.03 ms |
| _django_isolate_apps function | 0.03 ms |
| _django_clear_site_cache function | 0.03 ms |
| monkeypatch function | 0.02 ms |
Database
7 queries · 6 msNo repeated queries.
Biggest pieces of work
|
call test body
fedidevs/tests.py:58
|
57 ms |
|
call _post_teardown
django/test/testcases.py:1243
|
2 ms |
|
call _pre_setup
django/test/testcases.py:1167
|
1 ms |
|
setup __init__
__init__:-1
|
1 ms |
Reliability
14 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 14 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 2 weeks ago | CI github-actions:test | passed | 62 ms | Profile |
| 2 weeks, 5 days ago | CI github-actions:test | passed | 84 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 127 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 80 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 94 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 110 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 62 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 335 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 131 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 195 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 138 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 220 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 161 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 48 ms | Run |