Tests / ft/tests.py
TestTrubleshootingPage::test_troubleshooting_is_only_for_members
First seen 3 weeks ago in 78a4357
CI
github-actions:test
12 runs
Average
71 ms
median 73 ms
max 99 ms
max 99 ms
Phases
Setup 0.71 ms
Call 70 ms
Teardown 0.18 ms
Categories
Database 46 ms
App code 0.27 ms
Password hashing 0.13 ms
Other (Libraries, Unsampled, Logging, Templates, ...) 24 ms
56 database queries per run
Needs 296 KB of memory (max 784 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 16 hours ago ·
open run
call98 ms98.9%
TestTrubleshootingPage.test_troubleshooting_is_only_for_membersft/tests.py:120 self.assertEqual(self.client.get(url).status_code, 302) # sign in55 ms55.9%
Client.getdjango/test/client.py:112455 ms55.9%
RequestFactory.getdjango/test/client.py:47555 ms55.9%
RequestFactory.genericdjango/test/client.py:67155 ms55.9%
Client.requestdjango/test/client.py:108255 ms55.9%
ClientHandler.__call__django/test/client.py:17355 ms55.9%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6255 ms55.9%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10455 ms55.9%
WhiteNoise.add_fileswhitenoise/base.py:10855 ms55.9%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12053 ms53.0%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13153 ms53.0%
WhiteNoise.get_static_filewhitenoise/base.py:20843 ms43.0%
StaticFile.__init__whitenoise/responders.py:7221 ms21.5%
StaticFile.get_file_statswhitenoise/responders.py:16118 ms18.6%
__init____init__:-118 ms18.6%
FileEntry.__init__whitenoise/responders.py:26318 ms18.6%
FileEntry.stat_regular_filewhitenoise/responders.py:27617 ms17.2%
<GC>~16 ms15.8%
StaticFile.get_file_statswhitenoise/responders.py:1573 ms2.9%
StaticFile.__init__whitenoise/responders.py:737 ms7.2%
StaticFile.get_headerswhitenoise/responders.py:1764 ms4.3%
formatdate<stdlib>/email/utils.py:2664 ms4.3%
format_datetime<stdlib>/email/utils.py:2843 ms2.9%
StaticFile.get_headerswhitenoise/responders.py:1813 ms2.9%
StaticFile.__init__whitenoise/responders.py:746 ms5.7%
parsedate<stdlib>/email/_parseaddr.py:1851 ms1.4%
Headers.__getitem__<stdlib>/wsgiref/headers.py:831 ms1.4%
StaticFile.__init__whitenoise/responders.py:764 ms4.3%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1893 ms2.9%
Headers.__getitem__<stdlib>/wsgiref/headers.py:831 ms1.4%
Headers.get<stdlib>/wsgiref/headers.py:1041 ms1.4%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1901 ms1.4%
StaticFile.__init__whitenoise/responders.py:773 ms2.9%
StaticFile.get_alternativeswhitenoise/responders.py:2001 ms1.4%
StaticFile.get_alternativeswhitenoise/responders.py:2011 ms1.4%
WhiteNoise.get_static_filewhitenoise/base.py:2036 ms5.7%
WhiteNoise.add_cache_headerswhitenoise/base.py:2244 ms4.3%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1764 ms4.3%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1973 ms2.9%
URLMixin.urldebug_toolbar/panels/staticfiles.py:201 ms1.4%
WhiteNoise.get_static_filewhitenoise/base.py:2023 ms2.9%
WhiteNoise.add_mime_headerswhitenoise/base.py:2213 ms2.9%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()37 ms37.2%
TestCase._fixture_teardowndjango/test/testcases.py:149434 ms34.4%
TestCase._should_check_constraintsdjango/test/testcases.py:150334 ms34.4%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:49234 ms34.4%
Cursor.executepsycopg/cursor.py:11334 ms34.4%
Connection.waitpsycopg/connection.py:49534 ms34.4%
BaseCursor._execute_genpsycopg/_cursor_base.py:20634 ms34.4%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:28634 ms34.4%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:7834 ms34.4%
TestCase._fixture_teardowndjango/test/testcases.py:14953 ms2.9%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4831 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:791 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms1.4%
Cursor.executepsycopg/cursor.py:1131 ms1.4%
Connection.waitpsycopg/connection.py:4951 ms1.4%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4841 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:791 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms1.4%
Cursor.executepsycopg/cursor.py:1131 ms1.4%
Connection.waitpsycopg/connection.py:4951 ms1.4%
TestTrubleshootingPage.test_troubleshooting_is_only_for_membersft/tests.py:121 self.client.force_login(User.objects.create_user("stranger"))6 ms5.7%
ClientMixin.force_logindjango/test/client.py:8554 ms4.3%
ClientMixin._logindjango/test/client.py:8763 ms2.9%
ClientMixin.sessiondjango/test/client.py:8123 ms2.9%
SessionStore.savedjango/contrib/sessions/backends/db.py:1213 ms2.9%
SessionStore.createdjango/contrib/sessions/backends/db.py:701 ms1.4%
SessionBase._get_new_session_keydjango/contrib/sessions/backends/base.py:1981 ms1.4%
SessionStore.existsdjango/contrib/sessions/backends/db.py:631 ms1.4%
QuerySet.existsdjango/db/models/query.py:13371 ms1.4%
Query.has_resultsdjango/db/models/sql/query.py:6811 ms1.4%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15921 ms1.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16111 ms1.4%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7671 ms1.4%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:861 ms1.4%
SQLCompiler.setup_querydjango/db/models/sql/compiler.py:751 ms1.4%
SQLCompiler.get_selectdjango/db/models/sql/compiler.py:2641 ms1.4%
SessionStore.createdjango/contrib/sessions/backends/db.py:741 ms1.4%
SessionStore.savedjango/contrib/sessions/backends/db.py:1231 ms1.4%
SessionStore.create_model_instancedjango/contrib/sessions/backends/db.py:1001 ms1.4%
Model.__init__django/db/models/base.py:5331 ms1.4%
ClientMixin._logindjango/test/client.py:8811 ms1.4%
logindjango/contrib/auth/__init__.py:1751 ms1.4%
SessionBase.__contains__django/contrib/sessions/backends/base.py:521 ms1.4%
SessionBase._get_sessiondjango/contrib/sessions/backends/base.py:2511 ms1.4%
SessionStore.loaddjango/contrib/sessions/backends/db.py:551 ms1.4%
SessionStore._get_session_from_dbdjango/contrib/sessions/backends/db.py:341 ms1.4%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms1.4%
QuerySet.getdjango/db/models/query.py:6351 ms1.4%
QuerySet.__len__django/db/models/query.py:3721 ms1.4%
QuerySet._fetch_alldjango/db/models/query.py:20001 ms1.4%
ModelIterable.__iter__django/db/models/query.py:951 ms1.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16621 ms1.4%
cursor_iterdjango/db/models/sql/compiler.py:22541 ms1.4%
UserManager.create_userdjango/contrib/auth/models.py:1751 ms1.4%
UserManager._create_userdjango/contrib/auth/models.py:1631 ms1.4%
AbstractBaseUser.savedjango/contrib/auth/base_user.py:621 ms1.4%
Model.savedjango/db/models/base.py:8741 ms1.4%
Model.save_basedjango/db/models/base.py:9661 ms1.4%
Model._save_tabledjango/db/models/base.py:11671 ms1.4%
Model._do_insertdjango/db/models/base.py:12181 ms1.4%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms1.4%
QuerySet._insertdjango/db/models/query.py:19181 ms1.4%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19251 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:791 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms1.4%
Cursor.executepsycopg/cursor.py:1131 ms1.4%
Connection.waitpsycopg/connection.py:4951 ms1.4%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms1.4%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms1.4%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms1.4%
Estimated from 69 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
ft/tests.py:120
self.assertEqual(self.client.get(url).status_code, 302) # sign in
TestTrubleshootingPage.test_troubleshooting_is_only_for_members
· Libraries
|
55 ms |
|
ft/tests.py:121
self.client.force_login(User.objects.create_user("stranger"))
TestTrubleshootingPage.test_troubleshooting_is_only_for_members
· Database
|
6 ms |
Fixtures
Exact setup time| _template_string_if_invalid_marker function | 0.06 ms |
| _live_server_helper function | 0.06 ms |
| _dj_autoclear_mailbox function | 0.05 ms |
| _django_db_marker function | 0.05 ms |
| _django_set_urlconf function | 0.04 ms |
| _django_clear_site_cache function | 0.03 ms |
| monkeypatch function | 0.03 ms |
Database
56 queries · 21 ms
Repeated queries are usually N+1 lookups: fetch them once with select_related / prefetch_related (or selectinload).
4×
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 ?
3×
SELECT %s AS "a" FROM "django_session" WHERE "django_session"."session_key" = %s LIMIT ?
3×
INSERT INTO "django_session" ("session_key", "session_data", "expire_date") VALUES (%s, %s, %s)
Biggest pieces of work
|
call test body
ft/tests.py:120
|
61 ms |
|
call _post_teardown
django/test/testcases.py:1240
|
37 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 | 99 ms | Profile |
| 1 week, 5 days ago | CI github-actions:test | passed | 42 ms | Profile |
| 2 weeks, 1 day ago | CI github-actions:test | passed | 70 ms | Profile |
| 2 weeks, 1 day ago | CI github-actions:test | passed | 62 ms | Profile |
| 2 weeks, 1 day ago | CI github-actions:test | passed | 89 ms | Profile |
| 2 weeks, 2 days ago | CI github-actions:test | passed | 48 ms | Profile |
| 2 weeks, 4 days ago | CI github-actions:test | passed | 93 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 78 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 74 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 78 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 44 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 72 ms | Profile |