Tests / confs/tests.py
TestConferenceApprovalVisibility::test_owner_sees_own_pending
First seen 1 month, 1 week ago in 0c23747
CI
github-actions:test
13 runs
Average
1.02 s
median 669 ms
max 2.02 s
max 2.02 s
Phases
Setup 1 ms
Call 1.02 s
Teardown 0.31 ms
Categories
Password hashing 926 ms
Database 31 ms
Factories 0.32 ms
App code 0.08 ms
Other (Libraries, Templates, pytest, Unsampled, ...) 60 ms
35 database queries per run
Needs 316 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
call518 ms99.9%
TestConferenceApprovalVisibility.setUpconfs/tests.py:1317 self.other = User.objects.create_user("other", password="pw")247 ms47.6%
UserManager.create_userdjango/contrib/auth/models.py:180247 ms47.6%
UserManager._create_userdjango/contrib/auth/models.py:167247 ms47.6%
UserManager._create_user_objectdjango/contrib/auth/models.py:160247 ms47.6%
make_passworddjango/contrib/auth/hashers.py:118247 ms47.6%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333247 ms47.6%
pbkdf2django/utils/crypto.py:93247 ms47.6%
TestConferenceApprovalVisibility.setUpconfs/tests.py:1316 self.owner = User.objects.create_user("owner", password="pw")243 ms46.8%
UserManager.create_userdjango/contrib/auth/models.py:180243 ms46.8%
UserManager._create_userdjango/contrib/auth/models.py:167242 ms46.6%
UserManager._create_user_objectdjango/contrib/auth/models.py:160242 ms46.6%
make_passworddjango/contrib/auth/hashers.py:118242 ms46.6%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333242 ms46.6%
pbkdf2django/utils/crypto.py:93242 ms46.6%
1 smaller frames hidden
TestConferenceApprovalVisibility.test_owner_sees_own_pendingconfs/tests.py:1343 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:17312 ms2.2%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6312 ms2.2%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10412 ms2.2%
WhiteNoise.add_fileswhitenoise/base.py:10812 ms2.2%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1207 ms1.4%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1316 ms1.2%
WhiteNoise.get_static_filewhitenoise/base.py:2123 ms0.6%
WhiteNoise.add_cache_headerswhitenoise/base.py:2333 ms0.6%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1763 ms0.6%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1973 ms0.6%
URLMixin.urldebug_toolbar/panels/staticfiles.py:203 ms0.6%
WhiteNoise.get_static_filewhitenoise/base.py:2173 ms0.6%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1154 ms0.8%
scantreewhitenoise/base.py:2714 ms0.8%
scantreewhitenoise/base.py:2713 ms0.6%
1 smaller frames hidden
ClientHandler.__call__django/test/client.py:1869 ms1.8%
BaseHandler.get_responsedjango/core/handlers/base.py:1429 ms1.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms1.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3809 ms1.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms1.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3809 ms1.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms1.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3809 ms1.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms1.8%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1239 ms1.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms1.8%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1459 ms1.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms1.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3809 ms1.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms1.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3809 ms1.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms1.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3809 ms1.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms1.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3809 ms1.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms1.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3809 ms1.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms1.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3809 ms1.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms1.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3809 ms1.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms1.8%
BaseHandler._get_responsedjango/core/handlers/base.py:1999 ms1.8%
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:666 ms1.2%
NodeList.renderdjango/template/base.py:11086 ms1.2%
Node.render_annotateddjango/template/base.py:10696 ms1.2%
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:22624 ms0.8%
ModelIterable.__iter__django/db/models/query.py:1034 ms0.8%
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%
1 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
2 smaller frames hidden
TestConferenceApprovalVisibility.test_owner_sees_own_pendingconfs/tests.py:1342 self.client.force_login(self.owner)4 ms0.8%
ClientMixin.force_logindjango/test/client.py:8584 ms0.8%
2 smaller frames hidden
Estimated from 495 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
confs/tests.py:1317
self.other = User.objects.create_user("other", password="pw")
TestConferenceApprovalVisibility.setUp
· Password hashing
|
247 ms |
|
confs/tests.py:1316
self.owner = User.objects.create_user("owner", password="pw")
TestConferenceApprovalVisibility.setUp
· Password hashing
|
243 ms |
|
confs/tests.py:1343
response = self.client.get(reverse("conferences"))
TestConferenceApprovalVisibility.test_owner_sees_own_pending
· Libraries
|
12 ms |
|
confs/views.py:128
return render(
conferences
· Database
|
7 ms |
|
confs/tests.py:1342
self.client.force_login(self.owner)
TestConferenceApprovalVisibility.test_owner_sees_own_pending
· Libraries
|
4 ms |
|
confs/tests.py:1326
self.pending = baker.make(
TestConferenceApprovalVisibility.setUp
· Factories
|
1 ms |
|
confs/views.py:41
for al in ConferenceLookup.objects.values("language").annotate(count=Count("language")).order_by("-count")
conferences
· Database
|
1 ms |
|
confs/views.py:101
.annotate(posts_count=Count("conferencepost", filter=Q(conferencepost__created_at__gt=F("posts_after"))))
conferences
· Database
|
1 ms |
Fixtures
Exact setup time| _live_server_helper function | 0.05 ms |
| _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 |
| _django_set_urlconf function | 0.02 ms |
| _django_clear_site_cache function | 0.02 ms |
| monkeypatch function | 0.01 ms |
Database
35 queries · 10 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:1317
|
490 ms |
|
call test body
confs/tests.py:1343
|
25 ms |
| call pytest internals | 1 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 | 518 ms | Profile |
| 2 weeks, 5 days ago | CI github-actions:test | passed | 669 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 643 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 438 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 656 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 668 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 632 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 1.24 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 976 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 911 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 1.95 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 2.02 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 1.89 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 950 ms | Run |