Tests / fedidevs/tests.py
TestPotatoqDashboard::test_superuser_without_staff_flag_sees_dashboard
First seen 1 month ago in 9b75244
CI
github-actions:test
7 runs
Average
85 ms
median 82 ms
max 121 ms
max 121 ms
Phases
Setup 1 ms
Call 79 ms
Teardown 4 ms
Categories
Database 26 ms
Other (Libraries, pytest, Unsampled, Deep copies, ...) 58 ms
22 database queries per run
Needs 2 KB of memory (max 8 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
call51 ms91.1%
TestPotatoqDashboard.test_superuser_without_staff_flag_sees_dashboardfedidevs/tests.py:151 self.client.force_login(self.superuser)26 ms46.6%
ClientMixin.force_logindjango/test/client.py:85826 ms46.6%
ClientMixin._logindjango/test/client.py:88919 ms33.9%
logindjango/contrib/auth/__init__.py:17717 ms29.7%
SessionBase.__contains__django/contrib/sessions/backends/base.py:5217 ms29.7%
SessionBase._get_sessiondjango/contrib/sessions/backends/base.py:25417 ms29.7%
SessionStore.loaddjango/contrib/sessions/backends/db.py:5517 ms29.7%
SessionStore._get_session_from_dbdjango/contrib/sessions/backends/db.py:3417 ms29.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:8717 ms29.7%
QuerySet.getdjango/db/models/query.py:70215 ms27.5%
QuerySet.__len__django/db/models/query.py:42115 ms27.5%
QuerySet._fetch_alldjango/db/models/query.py:226215 ms27.5%
ModelIterable.__iter__django/db/models/query.py:10314 ms25.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162514 ms25.4%
CursorWrapper.executedjango/db/backends/utils.py:7914 ms25.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9214 ms25.4%
CursorWrapper._executedjango/db/backends/utils.py:10514 ms25.4%
Cursor.executepsycopg/cursor.py:11314 ms25.4%
Connection.waitpsycopg/connection.py:49514 ms25.4%
BaseCursor._execute_genpsycopg/_cursor_base.py:20614 ms25.4%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:28614 ms25.4%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:7814 ms25.4%
QuerySet.getdjango/db/models/query.py:6921 ms2.1%
logindjango/contrib/auth/__init__.py:1891 ms2.1%
SessionBase.cycle_keydjango/contrib/sessions/backends/base.py:4401 ms2.1%
SessionStore.deletedjango/contrib/sessions/backends/db.py:1751 ms2.1%
Model.deletedjango/db/models/base.py:13311 ms2.1%
Collector.deletedjango/db/models/deletion.py:4831 ms2.1%
DeleteQuery.delete_batchdjango/db/models/sql/subqueries.py:431 ms2.1%
DeleteQuery.do_querydjango/db/models/sql/subqueries.py:251 ms2.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16251 ms2.1%
CursorWrapper.executedjango/db/backends/utils.py:791 ms2.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms2.1%
logindjango/contrib/auth/__init__.py:1971 ms2.1%
rotate_tokendjango/middleware/csrf.py:1221 ms2.1%
_add_new_csrf_cookiedjango/middleware/csrf.py:861 ms2.1%
_get_new_csrf_stringdjango/middleware/csrf.py:561 ms2.1%
get_random_stringdjango/utils/crypto.py:781 ms2.1%
get_random_string.<locals>.<genexpr>django/utils/crypto.py:781 ms2.1%
ClientMixin._logindjango/test/client.py:8847 ms12.7%
ClientMixin.sessiondjango/test/client.py:8157 ms12.7%
SessionStore.savedjango/contrib/sessions/backends/db.py:1217 ms12.7%
SessionStore.createdjango/contrib/sessions/backends/db.py:705 ms8.5%
SessionBase._get_new_session_keydjango/contrib/sessions/backends/base.py:2015 ms8.5%
SessionStore.existsdjango/contrib/sessions/backends/db.py:635 ms8.5%
QuerySet.existsdjango/db/models/query.py:14585 ms8.5%
Query.has_resultsdjango/db/models/sql/query.py:6875 ms8.5%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15935 ms8.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16255 ms8.5%
CursorWrapper.executedjango/db/backends/utils.py:795 ms8.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:925 ms8.5%
CursorWrapper._executedjango/db/backends/utils.py:1055 ms8.5%
Cursor.executepsycopg/cursor.py:1135 ms8.5%
Connection.waitpsycopg/connection.py:4955 ms8.5%
BaseCursor._execute_genpsycopg/_cursor_base.py:2065 ms8.5%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2865 ms8.5%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:785 ms8.5%
SessionStore.createdjango/contrib/sessions/backends/db.py:742 ms4.2%
SessionStore.savedjango/contrib/sessions/backends/db.py:1262 ms4.2%
Atomic.__exit__django/db/transaction.py:2592 ms4.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms4.2%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4312 ms4.2%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3752 ms4.2%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.2%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms4.2%
Cursor.executepsycopg/cursor.py:1132 ms4.2%
Connection.waitpsycopg/connection.py:4952 ms4.2%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms4.2%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms4.2%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms4.2%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()13 ms23.3%
TestCase._fixture_teardowndjango/test/testcases.py:14985 ms8.5%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4955 ms8.5%
CursorWrapper.executedjango/db/backends/utils.py:795 ms8.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:925 ms8.5%
CursorWrapper._executedjango/db/backends/utils.py:1035 ms8.5%
Cursor.executepsycopg/cursor.py:1135 ms8.5%
Connection.waitpsycopg/connection.py:4955 ms8.5%
BaseCursor._execute_genpsycopg/_cursor_base.py:2064 ms6.4%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2864 ms6.4%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:784 ms6.4%
TestCase._fixture_teardowndjango/test/testcases.py:15005 ms8.5%
TestCase._rollback_atomicsdjango/test/testcases.py:14085 ms8.5%
Atomic.__exit__django/db/transaction.py:2982 ms4.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms4.2%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4312 ms4.2%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3752 ms4.2%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.2%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms4.2%
Cursor.executepsycopg/cursor.py:1132 ms4.2%
Connection.waitpsycopg/connection.py:4952 ms4.2%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms4.2%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms4.2%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms4.2%
Atomic.__exit__django/db/transaction.py:2952 ms4.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:261 ms2.1%
BaseDatabaseWrapper.savepoint_rollbackdjango/db/backends/base/base.py:4131 ms2.1%
BaseDatabaseWrapper._savepoint_rollbackdjango/db/backends/base/base.py:3711 ms2.1%
CursorWrapper.executedjango/db/backends/utils.py:791 ms2.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms2.1%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms2.1%
Cursor.executepsycopg/cursor.py:1131 ms2.1%
Connection.waitpsycopg/connection.py:4951 ms2.1%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms2.1%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms2.1%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms2.1%
TestCase._fixture_teardowndjango/test/testcases.py:14972 ms4.2%
TestCase._should_check_constraintsdjango/test/testcases.py:15062 ms4.2%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:5042 ms4.2%
Cursor.executepsycopg/cursor.py:1132 ms4.2%
Connection.waitpsycopg/connection.py:4952 ms4.2%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms4.2%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms4.2%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms4.2%
TestCase._fixture_teardowndjango/test/testcases.py:14931 ms2.1%
TestPotatoqDashboard.test_superuser_without_staff_flag_sees_dashboardfedidevs/tests.py:152 response = self.client.get("/potatoq/app.js")11 ms19.1%
Client.getdjango/test/client.py:113311 ms19.1%
RequestFactory.getdjango/test/client.py:47511 ms19.1%
RequestFactory.genericdjango/test/client.py:67111 ms19.1%
Client.requestdjango/test/client.py:109111 ms19.1%
ClientHandler.__call__django/test/client.py:1738 ms14.8%
BaseHandler.load_middlewaredjango/core/handlers/base.py:638 ms14.8%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:1048 ms14.8%
WhiteNoise.add_fileswhitenoise/base.py:1088 ms14.8%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1205 ms8.5%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1315 ms8.5%
WhiteNoise.get_static_filewhitenoise/base.py:2174 ms6.4%
StaticFile.__init__whitenoise/responders.py:751 ms2.1%
Headers.__getitem__<stdlib>/wsgiref/headers.py:831 ms2.1%
StaticFile.__init__whitenoise/responders.py:731 ms2.1%
StaticFile.get_headerswhitenoise/responders.py:1761 ms2.1%
StaticFile.__init__whitenoise/responders.py:761 ms2.1%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1881 ms2.1%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1154 ms6.4%
scantreewhitenoise/base.py:2712 ms4.2%
scantreewhitenoise/base.py:2731 ms2.1%
scantreewhitenoise/base.py:2711 ms2.1%
scantreewhitenoise/base.py:2711 ms2.1%
scantreewhitenoise/base.py:2711 ms2.1%
scantreewhitenoise/base.py:2711 ms2.1%
scantreewhitenoise/base.py:2691 ms2.1%
ClientHandler.__call__django/test/client.py:1861 ms2.1%
BaseHandler.get_responsedjango/core/handlers/base.py:1421 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3801 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3801 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3801 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms2.1%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1231 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms2.1%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1451 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3801 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3801 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3801 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3801 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3801 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3801 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3801 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms2.1%
BaseHandler._get_responsedjango/core/handlers/base.py:1991 ms2.1%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:641 ms2.1%
potatoq_dashboardfedidevs/views.py:59 result = _potatoq_dashboard(current_app()).handle(1 ms2.1%
Dashboard.handlepotatoq/dashboard/__init__.py:1301 ms2.1%
Path.read_bytes<stdlib>/pathlib/__init__.py:9771 ms2.1%
ClientHandler.__call__django/test/client.py:2071 ms2.1%
HttpResponseBase.closedjango/http/response.py:3481 ms2.1%
Signal.senddjango/dispatch/dispatcher.py:2491 ms2.1%
teardown4 ms7.8%
TestCase.tearDownClassdjango/test/testcases.py:1458 conn.close()4 ms7.8%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:264 ms7.8%
BaseDatabaseWrapper.closedjango/db/backends/base/base.py:3554 ms7.8%
DatabaseWrapper._closedjango/db/backends/postgresql/base.py:4084 ms7.8%
Connection.closepsycopg/connection.py:2014 ms7.8%
Estimated from 48 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
fedidevs/tests.py:151
self.client.force_login(self.superuser)
TestPotatoqDashboard.test_superuser_without_staff_flag_sees_dashboard
· Database
|
26 ms |
|
fedidevs/tests.py:152
response = self.client.get("/potatoq/app.js")
TestPotatoqDashboard.test_superuser_without_staff_flag_sees_dashboard
· Libraries
|
10 ms |
|
fedidevs/views.py:59
result = _potatoq_dashboard(current_app()).handle(
potatoq_dashboard
· Libraries
|
1 ms |
Fixtures
Exact setup time| _dj_autoclear_mailbox function | 0.04 ms |
| _template_string_if_invalid_marker function | 0.03 ms |
| _django_db_marker 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 |
| _django_clear_site_cache function | 0.02 ms |
| monkeypatch function | 0.02 ms |
Database
22 queries · 5 msNo repeated queries.
Biggest pieces of work
|
call test body
fedidevs/tests.py:151
|
37 ms |
|
call _post_teardown
django/test/testcases.py:1243
|
13 ms |
|
teardown tearDownClass
django/test/testcases.py:1458
|
4 ms |
| call pytest internals | 1 ms |
Reliability
7 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 7 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 2 weeks ago | CI github-actions:test | passed | 56 ms | Profile |
| 2 weeks, 5 days ago | CI github-actions:test | passed | 98 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 121 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 52 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 82 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 119 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 63 ms | Profile |