Tests / confs/tests.py
TestConferenceApprovalVisibility::test_other_user_does_not_see_pending
First seen 1 month, 1 week ago in 0c23747
CI
github-actions:test
13 runs
Average
1.08 s
median 685 ms
max 2.29 s
max 2.29 s
Phases
Setup 8 ms
Call 1.07 s
Teardown 0.29 ms
Categories
Password hashing 967 ms
Database 50 ms
Factories 0.62 ms
Other (Libraries, Templates, pytest, Unsampled) 59 ms
35 database queries per run
Needs 425 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
call530 ms99.9%
TestConferenceApprovalVisibility.setUpconfs/tests.py:1316 self.owner = User.objects.create_user("owner", password="pw")255 ms48.1%
UserManager.create_userdjango/contrib/auth/models.py:180255 ms48.1%
UserManager._create_userdjango/contrib/auth/models.py:167254 ms47.9%
UserManager._create_user_objectdjango/contrib/auth/models.py:160254 ms47.9%
make_passworddjango/contrib/auth/hashers.py:118254 ms47.9%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333254 ms47.9%
pbkdf2django/utils/crypto.py:93254 ms47.9%
1 smaller frames hidden
TestConferenceApprovalVisibility.setUpconfs/tests.py:1317 self.other = User.objects.create_user("other", password="pw")249 ms46.9%
UserManager.create_userdjango/contrib/auth/models.py:180249 ms46.9%
UserManager._create_userdjango/contrib/auth/models.py:167248 ms46.7%
UserManager._create_user_objectdjango/contrib/auth/models.py:160248 ms46.7%
make_passworddjango/contrib/auth/hashers.py:118248 ms46.7%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333248 ms46.7%
pbkdf2django/utils/crypto.py:93248 ms46.7%
1 smaller frames hidden
TestConferenceApprovalVisibility.test_other_user_does_not_see_pendingconfs/tests.py:1349 response = self.client.get(reverse("conferences"))21 ms4.0%
Client.getdjango/test/client.py:113321 ms4.0%
RequestFactory.getdjango/test/client.py:47521 ms4.0%
RequestFactory.genericdjango/test/client.py:67121 ms4.0%
Client.requestdjango/test/client.py:109121 ms4.0%
ClientHandler.__call__django/test/client.py:18612 ms2.2%
BaseHandler.get_responsedjango/core/handlers/base.py:14212 ms2.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5612 ms2.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38012 ms2.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms2.0%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms2.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms2.0%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms2.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms2.0%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12310 ms2.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms2.0%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14510 ms2.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms2.0%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms2.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms2.0%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms2.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms2.0%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms2.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms2.0%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms2.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms2.0%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms2.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms2.0%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms2.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms2.0%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms2.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms2.0%
BaseHandler._get_responsedjango/core/handlers/base.py:19910 ms2.0%
conferencesconfs/views.py:128 return render(7 ms1.4%
renderdjango/shortcuts.py:277 ms1.4%
render_to_stringdjango/template/loader.py:627 ms1.4%
Template.renderdjango/template/backends/django.py:1077 ms1.4%
Template.renderdjango/template/base.py:1757 ms1.4%
instrumented_test_renderdjango/test/utils.py:1137 ms1.4%
NodeList.renderdjango/template/base.py:11087 ms1.4%
Node.render_annotateddjango/template/base.py:10697 ms1.4%
ExtendsNode.renderdjango/template/loader_tags.py:1607 ms1.4%
instrumented_test_renderdjango/test/utils.py:1137 ms1.4%
NodeList.renderdjango/template/base.py:11087 ms1.4%
Node.render_annotateddjango/template/base.py:10697 ms1.4%
BlockNode.renderdjango/template/loader_tags.py:665 ms1.0%
NodeList.renderdjango/template/base.py:11085 ms1.0%
Node.render_annotateddjango/template/base.py:10695 ms1.0%
IfNode.renderdjango/template/defaulttags.py:3324 ms0.8%
QuerySet.__bool__django/db/models/query.py:4534 ms0.8%
QuerySet._fetch_alldjango/db/models/query.py:22623 ms0.6%
ModelIterable.__iter__django/db/models/query.py:1033 ms0.6%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16253 ms0.6%
CursorWrapper.executedjango/db/backends/utils.py:793 ms0.6%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms0.6%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms0.6%
Cursor.executepsycopg/cursor.py:1133 ms0.6%
Connection.waitpsycopg/connection.py:4953 ms0.6%
1 smaller frames hidden
1 smaller frames hidden
2 smaller frames hidden
2 smaller frames hidden
ClientHandler.__call__django/test/client.py:1739 ms1.8%
BaseHandler.load_middlewaredjango/core/handlers/base.py:639 ms1.8%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:1049 ms1.8%
WhiteNoise.add_fileswhitenoise/base.py:1089 ms1.8%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1206 ms1.2%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1316 ms1.2%
WhiteNoise.get_static_filewhitenoise/base.py:2124 ms0.8%
1 smaller frames hidden
WhiteNoise.update_files_dictionarywhitenoise/base.py:1153 ms0.6%
scantreewhitenoise/base.py:2713 ms0.6%
TestConferenceApprovalVisibility.test_other_user_does_not_see_pendingconfs/tests.py:1348 self.client.force_login(self.other)4 ms0.8%
ClientMixin.force_logindjango/test/client.py:8584 ms0.8%
1 smaller frames hidden
Estimated from 505 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
confs/tests.py:1316
self.owner = User.objects.create_user("owner", password="pw")
TestConferenceApprovalVisibility.setUp
· Password hashing
|
255 ms |
|
confs/tests.py:1317
self.other = User.objects.create_user("other", password="pw")
TestConferenceApprovalVisibility.setUp
· Password hashing
|
249 ms |
|
confs/tests.py:1349
response = self.client.get(reverse("conferences"))
TestConferenceApprovalVisibility.test_other_user_does_not_see_pending
· Libraries
|
10 ms |
|
confs/views.py:128
return render(
conferences
· Database
|
7 ms |
|
confs/tests.py:1348
self.client.force_login(self.other)
TestConferenceApprovalVisibility.test_other_user_does_not_see_pending
· Database
|
4 ms |
|
confs/views.py:85
if request.user.is_authenticated:
conferences
· Database
|
2 ms |
|
confs/views.py:107
.annotate(posts_count=Count("conferencepost", filter=Q(conferencepost__created_at__gt=F("posts_after"))))
conferences
· Database
|
1 ms |
Fixtures
Exact setup time| _dj_autoclear_mailbox function | 0.03 ms |
| _template_string_if_invalid_marker function | 0.03 ms |
| _django_db_marker function | 0.02 ms |
| _django_isolate_apps function | 0.02 ms |
| _live_server_helper function | 0.02 ms |
| _django_set_urlconf function | 0.02 ms |
| _django_clear_site_cache function | 0.02 ms |
| monkeypatch function | 0.01 ms |
Database
35 queries · 11 ms
Repeated queries are usually N+1 lookups: fetch them once with select_related / prefetch_related (or selectinload).
3×
SELECT "confs_conference"."id", "confs_conference"."name", "confs_conference"."slug", "confs_conference"."location", "confs_conference"."start_date", "confs_conference"."end_date", "confs_conference"."time_zone", "confs_conference"."archived_date", "confs_conference"."approved_at", "confs_conferenc…
Biggest pieces of work
|
call setUp
confs/tests.py:1316
|
503 ms |
|
call test body
confs/tests.py:1349
|
25 ms |
|
call _post_teardown
django/test/testcases.py:1243
|
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 | 530 ms | Profile |
| 2 weeks, 5 days ago | CI github-actions:test | passed | 685 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 641 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 436 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 674 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 666 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 662 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 1.55 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 1.02 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 885 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 1.72 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 2.23 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 2.29 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 1.00 s | Run |