Tests / apps/projects/tests.py
ProjectPagesTest::test_dashboard_other_users_project
First seen 1 month, 1 week ago in 78a4357
CI
github-actions:test
15 runs
Average
52 ms
median 58 ms
max 77 ms
max 77 ms
Phases
Setup 0.63 ms
Call 51 ms
Teardown 0.16 ms
Categories
Database 29 ms
App code 0.27 ms
Other (Libraries, Unsampled, Logging, pytest, ...) 22 ms
34 database queries per run
Needs 67 KB of memory (max 608 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
call42 ms98.3%
ProjectPagesTest.test_dashboard_other_users_projectapps/projects/tests.py:991 response = self.client.get(self.project.url("project_dashboard"))25 ms59.0%
Client.getdjango/test/client.py:112425 ms59.0%
RequestFactory.getdjango/test/client.py:47525 ms59.0%
RequestFactory.genericdjango/test/client.py:67125 ms59.0%
Client.requestdjango/test/client.py:108225 ms59.0%
ClientHandler.__call__django/test/client.py:18617 ms39.3%
BaseHandler.get_responsedjango/core/handlers/base.py:14117 ms39.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5517 ms39.3%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:13017 ms39.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5517 ms39.3%
MiddlewareMixin.__call__django/utils/deprecation.py:30917 ms39.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5517 ms39.3%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12317 ms39.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5517 ms39.3%
MiddlewareMixin.__call__django/utils/deprecation.py:30917 ms39.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5517 ms39.3%
MiddlewareMixin.__call__django/utils/deprecation.py:30917 ms39.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5517 ms39.3%
MiddlewareMixin.__call__django/utils/deprecation.py:30917 ms39.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5517 ms39.3%
MiddlewareMixin.__call__django/utils/deprecation.py:30917 ms39.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5517 ms39.3%
MiddlewareMixin.__call__django/utils/deprecation.py:30917 ms39.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5517 ms39.3%
MiddlewareMixin.__call__django/utils/deprecation.py:30917 ms39.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5517 ms39.3%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:3417 ms39.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5517 ms39.3%
BaseHandler._get_responsedjango/core/handlers/base.py:19817 ms39.3%
project_dashboardapps/projects/urls.py:13217 ms39.3%
find_projectapps/projects/urls.py:5217 ms39.3%
can_viewapps/projects/urls.py:3317 ms39.3%
can_manage_projectapps/projects/urls.py:40 return user.is_superuser or project.organization.membership_set.filter(user=user).exists()17 ms39.3%
QuerySet.existsdjango/db/models/query.py:133717 ms39.3%
Query.has_resultsdjango/db/models/sql/query.py:68117 ms39.3%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:159217 ms39.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162417 ms39.3%
CursorWrapper.executedjango/db/backends/utils.py:7917 ms39.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9217 ms39.3%
CursorWrapper._executedjango/db/backends/utils.py:10517 ms39.3%
Cursor.executepsycopg/cursor.py:11317 ms39.3%
Connection.waitpsycopg/connection.py:49517 ms39.3%
ClientHandler.__call__django/test/client.py:1738 ms19.7%
BaseHandler.load_middlewaredjango/core/handlers/base.py:628 ms19.7%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:1048 ms19.7%
WhiteNoise.add_fileswhitenoise/base.py:1088 ms19.7%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1205 ms11.8%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1315 ms11.8%
WhiteNoise.get_static_filewhitenoise/base.py:2085 ms11.8%
StaticFile.__init__whitenoise/responders.py:763 ms7.9%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1892 ms3.9%
StaticFile.__init__whitenoise/responders.py:722 ms3.9%
StaticFile.get_file_statswhitenoise/responders.py:1612 ms3.9%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1153 ms7.9%
scantreewhitenoise/base.py:2642 ms3.9%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()7 ms15.7%
TestCase._fixture_teardowndjango/test/testcases.py:14953 ms7.9%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4833 ms7.9%
CursorWrapper.executedjango/db/backends/utils.py:793 ms7.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms7.9%
CursorWrapper._executedjango/db/backends/utils.py:1033 ms7.9%
Cursor.executepsycopg/cursor.py:1133 ms7.9%
Connection.waitpsycopg/connection.py:4953 ms7.9%
TestCase._fixture_teardowndjango/test/testcases.py:14942 ms3.9%
TestCase._should_check_constraintsdjango/test/testcases.py:15032 ms3.9%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:4922 ms3.9%
Cursor.executepsycopg/cursor.py:1132 ms3.9%
Connection.waitpsycopg/connection.py:4952 ms3.9%
TestCase._fixture_teardowndjango/test/testcases.py:14972 ms3.9%
TestCase._rollback_atomicsdjango/test/testcases.py:14052 ms3.9%
Atomic.__exit__django/db/transaction.py:2862 ms3.9%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms3.9%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4312 ms3.9%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3752 ms3.9%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.9%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms3.9%
Cursor.executepsycopg/cursor.py:1132 ms3.9%
Connection.waitpsycopg/connection.py:4952 ms3.9%
ProjectPagesTest.setUpapps/projects/tests.py:954 self.client.force_login(self.user)7 ms15.7%
ClientMixin.force_logindjango/test/client.py:8557 ms15.7%
ClientMixin._logindjango/test/client.py:8813 ms7.9%
logindjango/contrib/auth/__init__.py:1752 ms3.9%
SessionBase.__contains__django/contrib/sessions/backends/base.py:522 ms3.9%
SessionBase._get_sessiondjango/contrib/sessions/backends/base.py:2512 ms3.9%
SessionStore.loaddjango/contrib/sessions/backends/db.py:552 ms3.9%
SessionStore._get_session_from_dbdjango/contrib/sessions/backends/db.py:342 ms3.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms3.9%
QuerySet.getdjango/db/models/query.py:6352 ms3.9%
QuerySet.__len__django/db/models/query.py:3722 ms3.9%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms3.9%
ModelIterable.__iter__django/db/models/query.py:952 ms3.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms3.9%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.9%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms3.9%
Cursor.executepsycopg/cursor.py:1132 ms3.9%
Connection.waitpsycopg/connection.py:4952 ms3.9%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms3.9%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms3.9%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms3.9%
logindjango/contrib/auth/__init__.py:1872 ms3.9%
SessionBase.cycle_keydjango/contrib/sessions/backends/base.py:4372 ms3.9%
SessionStore.deletedjango/contrib/sessions/backends/db.py:1752 ms3.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms3.9%
QuerySet.getdjango/db/models/query.py:6352 ms3.9%
QuerySet.__len__django/db/models/query.py:3722 ms3.9%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms3.9%
ModelIterable.__iter__django/db/models/query.py:952 ms3.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms3.9%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.9%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms3.9%
Cursor.executepsycopg/cursor.py:1132 ms3.9%
Connection.waitpsycopg/connection.py:4952 ms3.9%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms3.9%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms3.9%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms3.9%
ClientMixin._logindjango/test/client.py:8762 ms3.9%
ClientMixin.sessiondjango/test/client.py:8122 ms3.9%
SessionStore.savedjango/contrib/sessions/backends/db.py:1212 ms3.9%
SessionStore.createdjango/contrib/sessions/backends/db.py:702 ms3.9%
SessionBase._get_new_session_keydjango/contrib/sessions/backends/base.py:1982 ms3.9%
SessionStore.existsdjango/contrib/sessions/backends/db.py:632 ms3.9%
QuerySet.existsdjango/db/models/query.py:13372 ms3.9%
Query.has_resultsdjango/db/models/sql/query.py:6812 ms3.9%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15922 ms3.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms3.9%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.9%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms3.9%
Cursor.executepsycopg/cursor.py:1132 ms3.9%
Connection.waitpsycopg/connection.py:4952 ms3.9%
ClientMixin._logindjango/test/client.py:8832 ms3.9%
SessionStore.savedjango/contrib/sessions/backends/db.py:1272 ms3.9%
Model.savedjango/db/models/base.py:8742 ms3.9%
Model.save_basedjango/db/models/base.py:9662 ms3.9%
Model._save_tabledjango/db/models/base.py:11102 ms3.9%
Model._do_updatedjango/db/models/base.py:12112 ms3.9%
QuerySet._updatedjango/db/models/query.py:13272 ms3.9%
SQLUpdateCompiler.execute_returning_sqldjango/db/models/sql/compiler.py:21402 ms3.9%
SQLUpdateCompiler.execute_sqldjango/db/models/sql/compiler.py:21112 ms3.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms3.9%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.9%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms3.9%
Cursor.executepsycopg/cursor.py:1132 ms3.9%
Connection.waitpsycopg/connection.py:4952 ms3.9%
ProjectPagesTest.test_dashboard_other_users_projectapps/projects/tests.py:990 self.client.force_login(User.objects.create_user("stranger"))3 ms7.9%
ClientMixin.force_logindjango/test/client.py:8553 ms7.9%
ClientMixin._logindjango/test/client.py:8812 ms3.9%
logindjango/contrib/auth/__init__.py:1752 ms3.9%
SessionBase.__contains__django/contrib/sessions/backends/base.py:522 ms3.9%
SessionBase._get_sessiondjango/contrib/sessions/backends/base.py:2512 ms3.9%
SessionStore.loaddjango/contrib/sessions/backends/db.py:552 ms3.9%
SessionStore._get_session_from_dbdjango/contrib/sessions/backends/db.py:342 ms3.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms3.9%
QuerySet.getdjango/db/models/query.py:6352 ms3.9%
QuerySet.__len__django/db/models/query.py:3722 ms3.9%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms3.9%
ModelIterable.__iter__django/db/models/query.py:1282 ms3.9%
Model.from_dbdjango/db/models/base.py:6052 ms3.9%
ClientMixin._logindjango/test/client.py:8832 ms3.9%
SessionStore.savedjango/contrib/sessions/backends/db.py:1212 ms3.9%
SessionStore.createdjango/contrib/sessions/backends/db.py:742 ms3.9%
SessionStore.savedjango/contrib/sessions/backends/db.py:1232 ms3.9%
SessionStore.create_model_instancedjango/contrib/sessions/backends/db.py:1022 ms3.9%
SessionBase.encodedjango/contrib/sessions/backends/base.py:1262 ms3.9%
dumpsdjango/core/signing.py:1512 ms3.9%
Signer.sign_objectdjango/core/signing.py:2322 ms3.9%
Estimated from 25 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
apps/projects/urls.py:40
return user.is_superuser or project.organization.membership_set.filter(user=user).exists()
can_manage_project
· Database
|
17 ms |
|
apps/projects/tests.py:991
response = self.client.get(self.project.url("project_dashboard"))
ProjectPagesTest.test_dashboard_other_users_project
· Libraries
|
8 ms |
|
apps/projects/tests.py:954
self.client.force_login(self.user)
ProjectPagesTest.setUp
· Database
|
7 ms |
|
apps/projects/tests.py:990
self.client.force_login(User.objects.create_user("stranger"))
ProjectPagesTest.test_dashboard_other_users_project
· Database
|
3 ms |
Fixtures
Exact setup time| _dj_autoclear_mailbox function | 0.05 ms |
| _template_string_if_invalid_marker function | 0.03 ms |
| _django_db_marker 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
34 queries · 10 ms
Repeated queries are usually N+1 lookups: fetch them once with select_related / prefetch_related (or selectinload).
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)
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
apps/projects/tests.py:991
|
28 ms |
|
call _post_teardown
django/test/testcases.py:1240
|
7 ms |
|
call setUp
apps/projects/tests.py:954
|
7 ms |
Reliability
15 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 15 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 2 weeks ago | CI github-actions:test | passed | 43 ms | Profile |
| 2 weeks, 4 days ago | CI github-actions:test | passed | 58 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 33 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 63 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 27 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 62 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 46 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 77 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 37 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 62 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 61 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 59 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 61 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 32 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 58 ms | Profile |