Tests / apps/projects/tests.py
ProjectTestsPage::test_other_peoples_project
First seen 2 years, 11 months ago in d87c7a8
CI
github-actions:test
15 runs
Average
46 ms
median 48 ms
max 68 ms
max 68 ms
Phases
Setup 0.66 ms
Call 45 ms
Teardown 0.16 ms
Categories
Database 25 ms
Test code 0.24 ms
Other (Libraries, pytest, Unsampled, Deep copies) 21 ms
28 database queries per run
Needs 308 KB of memory (max 860 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
call39 ms98.2%
ProjectTestsPage.test_other_peoples_projectapps/projects/tests.py:349 response = self.client.get(other_project.url("project_tests"))25 ms63.6%
Client.getdjango/test/client.py:112425 ms63.6%
RequestFactory.getdjango/test/client.py:47525 ms63.6%
RequestFactory.genericdjango/test/client.py:67125 ms63.6%
Client.requestdjango/test/client.py:108225 ms63.6%
ClientHandler.__call__django/test/client.py:17318 ms46.2%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6218 ms46.2%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10418 ms46.2%
WhiteNoise.add_fileswhitenoise/base.py:10818 ms46.2%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12018 ms46.2%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13118 ms46.2%
WhiteNoise.get_static_filewhitenoise/base.py:20818 ms46.2%
StaticFile.__init__whitenoise/responders.py:779 ms23.1%
StaticFile.get_alternativeswhitenoise/responders.py:2005 ms11.6%
StaticFile.get_alternativeswhitenoise/responders.py:2072 ms5.8%
Headers.items<stdlib>/wsgiref/headers.py:1312 ms5.8%
<GC>~2 ms5.8%
StaticFile.get_alternativeswhitenoise/responders.py:2032 ms5.8%
StaticFile.__init__whitenoise/responders.py:727 ms17.3%
StaticFile.get_file_statswhitenoise/responders.py:1637 ms17.3%
<GC>~7 ms17.3%
StaticFile.__init__whitenoise/responders.py:762 ms5.8%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1892 ms5.8%
Headers.__getitem__<stdlib>/wsgiref/headers.py:832 ms5.8%
Headers.get<stdlib>/wsgiref/headers.py:1052 ms5.8%
ClientHandler.__call__django/test/client.py:1867 ms17.3%
BaseHandler.get_responsedjango/core/handlers/base.py:1417 ms17.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms17.3%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1307 ms17.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms17.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3097 ms17.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms17.3%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1237 ms17.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms17.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3097 ms17.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms17.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3097 ms17.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms17.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3097 ms17.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms17.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3097 ms17.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms17.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms11.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms11.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms11.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms11.6%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:345 ms11.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms11.6%
BaseHandler._get_responsedjango/core/handlers/base.py:1985 ms11.6%
project_testsapps/projects/urls.py:1775 ms11.6%
find_projectapps/projects/urls.py:49 project = get_object_or_404(2 ms5.8%
get_object_or_404django/shortcuts.py:902 ms5.8%
QuerySet.getdjango/db/models/query.py:6352 ms5.8%
QuerySet.__len__django/db/models/query.py:3722 ms5.8%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms5.8%
ModelIterable.__iter__django/db/models/query.py:952 ms5.8%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms5.8%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.8%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms5.8%
Cursor.executepsycopg/cursor.py:1132 ms5.8%
Connection.waitpsycopg/connection.py:4952 ms5.8%
find_projectapps/projects/urls.py:522 ms5.8%
can_viewapps/projects/urls.py:332 ms5.8%
can_manage_projectapps/projects/urls.py:38 if not user.is_authenticated:2 ms5.8%
new_method_proxy.<locals>.innerdjango/utils/functional.py:2512 ms5.8%
SimpleLazyObject._setupdjango/utils/functional.py:4042 ms5.8%
AuthenticationMiddleware.process_request.<locals>.<lambda>django/contrib/auth/middleware.py:402 ms5.8%
get_userdjango/contrib/auth/middleware.py:202 ms5.8%
get_userdjango/contrib/auth/__init__.py:3112 ms5.8%
_get_user_session_keydjango/contrib/auth/__init__.py:952 ms5.8%
SessionBase.__getitem__django/contrib/sessions/backends/base.py:552 ms5.8%
SessionBase._get_sessiondjango/contrib/sessions/backends/base.py:2512 ms5.8%
SessionStore.loaddjango/contrib/sessions/backends/db.py:552 ms5.8%
SessionStore._get_session_from_dbdjango/contrib/sessions/backends/db.py:342 ms5.8%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms5.8%
QuerySet.getdjango/db/models/query.py:6352 ms5.8%
QuerySet.__len__django/db/models/query.py:3722 ms5.8%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms5.8%
ModelIterable.__iter__django/db/models/query.py:952 ms5.8%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms5.8%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.8%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms5.8%
Cursor.executepsycopg/cursor.py:1132 ms5.8%
Connection.waitpsycopg/connection.py:4952 ms5.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3082 ms5.8%
MessageMiddleware.process_requestdjango/contrib/messages/middleware.py:122 ms5.8%
default_storagedjango/contrib/messages/storage/__init__.py:122 ms5.8%
FallbackStorage.__init__django/contrib/messages/storage/fallback.py:172 ms5.8%
CookieStorage.__init__django/contrib/messages/storage/cookie.py:922 ms5.8%
get_cookie_signerdjango/core/signing.py:1122 ms5.8%
ProjectTestsPage.setUpapps/projects/tests.py:338 self.client.force_login(self.user)7 ms17.3%
ClientMixin.force_logindjango/test/client.py:8557 ms17.3%
ClientMixin._logindjango/test/client.py:8815 ms11.6%
logindjango/contrib/auth/__init__.py:1875 ms11.6%
SessionBase.cycle_keydjango/contrib/sessions/backends/base.py:4342 ms5.8%
SessionStore.createdjango/contrib/sessions/backends/db.py:742 ms5.8%
SessionStore.savedjango/contrib/sessions/backends/db.py:1262 ms5.8%
Atomic.__enter__django/db/transaction.py:2112 ms5.8%
SessionBase.cycle_keydjango/contrib/sessions/backends/base.py:4372 ms5.8%
SessionStore.deletedjango/contrib/sessions/backends/db.py:1752 ms5.8%
Model.deletedjango/db/models/base.py:12972 ms5.8%
Collector.collectdjango/db/models/deletion.py:3102 ms5.8%
get_candidate_relations_to_deletedjango/db/models/deletion.py:902 ms5.8%
ClientMixin._logindjango/test/client.py:8832 ms5.8%
SessionStore.savedjango/contrib/sessions/backends/db.py:1232 ms5.8%
SessionStore.create_model_instancedjango/contrib/sessions/backends/db.py:1022 ms5.8%
SessionBase.encodedjango/contrib/sessions/backends/base.py:1262 ms5.8%
dumpsdjango/core/signing.py:1512 ms5.8%
Signer.sign_objectdjango/core/signing.py:2392 ms5.8%
TimestampSigner.signdjango/core/signing.py:2612 ms5.8%
Signer.signdjango/core/signing.py:2052 ms5.8%
Signer.signaturedjango/core/signing.py:2022 ms5.8%
ProjectTestsPage.test_other_peoples_projectapps/projects/tests.py:3485 ms11.6%
make_projectapps/projects/testing.py:622 ms5.8%
unique_slugapps/orgs/models.py:46 while slug in reserved or taken.filter(slug=slug).exists():2 ms5.8%
QuerySet.filterdjango/db/models/query.py:15422 ms5.8%
QuerySet._filter_or_excludedjango/db/models/query.py:15602 ms5.8%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:15702 ms5.8%
Query.add_qdjango/db/models/sql/query.py:16712 ms5.8%
Query._add_qdjango/db/models/sql/query.py:17032 ms5.8%
Query.build_filterdjango/db/models/sql/query.py:15732 ms5.8%
Query.get_initial_aliasdjango/db/models/sql/query.py:11162 ms5.8%
make_projectapps/projects/testing.py:64 project = Project.objects.create(2 ms5.8%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms5.8%
QuerySet.createdjango/db/models/query.py:6692 ms5.8%
Model.savedjango/db/models/base.py:8742 ms5.8%
Model.save_basedjango/db/models/base.py:9662 ms5.8%
Model._save_tabledjango/db/models/base.py:11672 ms5.8%
Model._do_insertdjango/db/models/base.py:12182 ms5.8%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms5.8%
QuerySet._insertdjango/db/models/query.py:19182 ms5.8%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19252 ms5.8%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.8%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms5.8%
Cursor.executepsycopg/cursor.py:1132 ms5.8%
Connection.waitpsycopg/connection.py:4952 ms5.8%
TransactionTestCase._pre_setupdjango/test/testcases.py:1164 cls._fixture_setup()2 ms5.8%
TestCase._fixture_setupdjango/test/testcases.py:14782 ms5.8%
TestCase._enter_atomicsdjango/test/testcases.py:13962 ms5.8%
Atomic.__enter__django/db/transaction.py:2112 ms5.8%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms5.8%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4002 ms5.8%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3672 ms5.8%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.8%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms5.8%
Cursor.executepsycopg/cursor.py:1132 ms5.8%
Connection.waitpsycopg/connection.py:4952 ms5.8%
Estimated from 17 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
apps/projects/tests.py:349
response = self.client.get(other_project.url("project_tests"))
ProjectTestsPage.test_other_peoples_project
· Libraries
|
20 ms |
|
apps/projects/tests.py:338
self.client.force_login(self.user)
ProjectTestsPage.setUp
· Database
|
7 ms |
|
apps/orgs/models.py:46
while slug in reserved or taken.filter(slug=slug).exists():
unique_slug
· Database
|
2 ms |
|
apps/projects/testing.py:64
project = Project.objects.create(
make_project
· Database
|
2 ms |
|
apps/projects/urls.py:49
project = get_object_or_404(
find_project
· Database
|
2 ms |
|
apps/projects/urls.py:38
if not user.is_authenticated:
can_manage_project
· Database
|
2 ms |
Fixtures
Exact setup time| _dj_autoclear_mailbox function | 0.05 ms |
| _django_db_marker function | 0.04 ms |
| _template_string_if_invalid_marker function | 0.03 ms |
| _django_clear_site_cache function | 0.02 ms |
| _django_set_urlconf function | 0.02 ms |
| _live_server_helper function | 0.02 ms |
| monkeypatch function | 0.01 ms |
Database
28 queries · 6 msNo repeated queries.
Biggest pieces of work
|
call test body
apps/projects/tests.py:349
|
30 ms |
|
call setUp
apps/projects/tests.py:338
|
7 ms |
|
call _pre_setup
django/test/testcases.py:1164
|
2 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 | 39 ms | Profile |
| 2 weeks, 4 days ago | CI github-actions:test | passed | 47 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 33 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 54 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 30 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 48 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 41 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 68 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 30 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 53 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 52 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 56 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 60 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 27 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 56 ms | Profile |