Tests / confs/tests.py
TestEditConference::test_owner_can_edit_after_approval
First seen 1 month, 1 week ago in 0c23747
CI
github-actions:test
13 runs
Average
1.54 s
median 1.32 s
max 3.32 s
max 3.32 s
Phases
Setup 2 ms
Call 1.53 s
Teardown 0.31 ms
Categories
Password hashing 1.45 s
Database 28 ms
Factories 0.52 ms
Test code 0.21 ms
Other (Libraries, Deep copies, pytest, Unsampled, ...) 55 ms
32 database queries per run
Needs 10 KB of memory (max 76 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
call854 ms99.9%
TestEditConference.setUpconfs/tests.py:1175 self.owner = User.objects.create_user("owner", password="pw")294 ms34.5%
UserManager.create_userdjango/contrib/auth/models.py:180294 ms34.5%
UserManager._create_userdjango/contrib/auth/models.py:167293 ms34.3%
UserManager._create_user_objectdjango/contrib/auth/models.py:160293 ms34.3%
make_passworddjango/contrib/auth/hashers.py:118293 ms34.3%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333293 ms34.3%
pbkdf2django/utils/crypto.py:93293 ms34.3%
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1176 self.other = User.objects.create_user("other", password="pw")268 ms31.4%
UserManager.create_userdjango/contrib/auth/models.py:180268 ms31.4%
UserManager._create_userdjango/contrib/auth/models.py:167268 ms31.4%
UserManager._create_user_objectdjango/contrib/auth/models.py:160268 ms31.4%
make_passworddjango/contrib/auth/hashers.py:118268 ms31.4%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333268 ms31.4%
pbkdf2django/utils/crypto.py:93268 ms31.4%
TestEditConference.setUpconfs/tests.py:1177 self.staff = User.objects.create_user("staff", password="pw", is_staff=True)263 ms30.8%
UserManager.create_userdjango/contrib/auth/models.py:180263 ms30.8%
UserManager._create_userdjango/contrib/auth/models.py:167262 ms30.6%
UserManager._create_user_objectdjango/contrib/auth/models.py:160262 ms30.6%
make_passworddjango/contrib/auth/hashers.py:118262 ms30.6%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333262 ms30.6%
pbkdf2django/utils/crypto.py:93262 ms30.6%
1 smaller frames hidden
TestEditConference.test_owner_can_edit_after_approvalconfs/tests.py:1247 response = self.client.post(self.url, self._post_data(name="Edited After Approval"))23 ms2.7%
Client.postdjango/test/client.py:116223 ms2.7%
RequestFactory.postdjango/test/client.py:49923 ms2.7%
RequestFactory.genericdjango/test/client.py:67123 ms2.7%
Client.requestdjango/test/client.py:109123 ms2.7%
ClientHandler.__call__django/test/client.py:18614 ms1.7%
BaseHandler.get_responsedjango/core/handlers/base.py:14214 ms1.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5614 ms1.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38014 ms1.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5614 ms1.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38014 ms1.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5614 ms1.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38014 ms1.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5614 ms1.7%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12314 ms1.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5614 ms1.7%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14514 ms1.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5614 ms1.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38014 ms1.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5614 ms1.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38014 ms1.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5614 ms1.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38014 ms1.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5614 ms1.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38014 ms1.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5614 ms1.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38014 ms1.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5614 ms1.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38014 ms1.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5614 ms1.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38014 ms1.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5614 ms1.7%
BaseHandler._get_responsedjango/core/handlers/base.py:19914 ms1.7%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:6214 ms1.7%
edit_conferenceconfs/views.py:5416 ms0.7%
ConferenceForm.__init__confs/views.py:420 super().__init__(*args, **kwargs)6 ms0.7%
BaseModelForm.__init__django/forms/models.py:3815 ms0.6%
BaseForm.__init__django/forms/forms.py:1065 ms0.6%
deepcopy<stdlib>/copy.py:1305 ms0.6%
_deepcopy_dict<stdlib>/copy.py:2015 ms0.6%
deepcopy<stdlib>/copy.py:1375 ms0.6%
ChoiceField.__deepcopy__django/forms/fields.py:8745 ms0.6%
deepcopy<stdlib>/copy.py:1305 ms0.6%
_deepcopy_list<stdlib>/copy.py:1765 ms0.6%
deepcopy<stdlib>/copy.py:1305 ms0.6%
1 smaller frames hidden
2 smaller frames hidden
ClientHandler.__call__django/test/client.py:1739 ms1.1%
BaseHandler.load_middlewaredjango/core/handlers/base.py:639 ms1.1%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:1049 ms1.1%
WhiteNoise.add_fileswhitenoise/base.py:1089 ms1.1%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1157 ms0.8%
scantreewhitenoise/base.py:2716 ms0.7%
scantreewhitenoise/base.py:2716 ms0.7%
1 smaller frames hidden
1 smaller frames hidden
3 smaller frames hidden
Estimated from 838 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
confs/tests.py:1175
self.owner = User.objects.create_user("owner", password="pw")
TestEditConference.setUp
· Password hashing
|
294 ms |
|
confs/tests.py:1176
self.other = User.objects.create_user("other", password="pw")
TestEditConference.setUp
· Password hashing
|
268 ms |
|
confs/tests.py:1177
self.staff = User.objects.create_user("staff", password="pw", is_staff=True)
TestEditConference.setUp
· Password hashing
|
263 ms |
|
confs/tests.py:1247
response = self.client.post(self.url, self._post_data(name="Edited After Approval"))
TestEditConference.test_owner_can_edit_after_approval
· Libraries
|
9 ms |
|
confs/views.py:420
super().__init__(*args, **kwargs)
ConferenceForm.__init__
· Deep copies
|
6 ms |
|
confs/views.py:543
form.save()
edit_conference
· Database
|
4 ms |
|
confs/tests.py:1246
self.client.force_login(self.owner)
TestEditConference.test_owner_can_edit_after_approval
· Database
|
3 ms |
|
confs/views.py:542
if form.is_valid():
edit_conference
· Database
|
3 ms |
|
confs/tests.py:1178
self.conference = baker.make(
TestEditConference.setUp
· Database
|
1 ms |
|
confs/views.py:428
if tags and len(tags) > MAX_CONFERENCE_TAGS:
ConferenceForm.clean_conference_tags
· Database
|
1 ms |
Fixtures
Exact setup time| _dj_autoclear_mailbox function | 0.06 ms |
| _template_string_if_invalid_marker function | 0.03 ms |
| _django_db_marker function | 0.03 ms |
| _django_isolate_apps function | 0.03 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.02 ms |
Database
32 queries · 9 ms
Repeated queries are usually N+1 lookups: fetch them once with select_related / prefetch_related (or selectinload).
3×
INSERT INTO "auth_user" ("password", "last_login", "is_superuser", "username", "first_name", "last_name", "email", "is_staff", "is_active", "date_joined") VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s) RETURNING "auth_user"."id"
Biggest pieces of work
|
call setUp
confs/tests.py:1175
|
826 ms |
|
call test body
confs/tests.py:1247
|
26 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 | 854 ms | Profile |
| 2 weeks, 5 days ago | CI github-actions:test | passed | 1.21 s | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 1.21 s | Profile |
| 3 weeks ago | CI github-actions:test | passed | 735 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 1.32 s | Profile |
| 1 month ago | CI github-actions:test | passed | 1.11 s | Profile |
| 1 month ago | CI github-actions:test | passed | 1.36 s | Profile |
| 1 month ago | CI github-actions:test | passed | 1.37 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 1.46 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 921 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 2.94 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 2.15 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 3.32 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 1.37 s | Run |