Tests / confs/tests.py
TestApproveConference::test_staff_approves
First seen 1 month, 1 week ago in 0c23747
CI
github-actions:test
13 runs
Average
1.18 s
median 1.14 s
max 2.19 s
max 2.19 s
Phases
Setup 3 ms
Call 1.18 s
Teardown 0.40 ms
Categories
Password hashing 1.06 s
Database 28 ms
Factories 0.24 ms
Test code 0.08 ms
Other (Libraries, pytest, Unsampled, Serialization) 95 ms
28 database queries per run
Needs 46 KB of memory (max 368 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
setup0.96 ms0.1%
call833 ms99.9%
TestApproveConference.setUpconfs/tests.py:1372 self.normal = User.objects.create_user("bob", password="pw")370 ms44.3%
UserManager.create_userdjango/contrib/auth/models.py:180370 ms44.3%
UserManager._create_userdjango/contrib/auth/models.py:167369 ms44.2%
UserManager._create_user_objectdjango/contrib/auth/models.py:160369 ms44.2%
make_passworddjango/contrib/auth/hashers.py:118369 ms44.2%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333369 ms44.2%
pbkdf2django/utils/crypto.py:93369 ms44.2%
1 smaller frames hidden
TestApproveConference.setUpconfs/tests.py:1371 self.staff = User.objects.create_user("staff", password="pw", is_staff=True)365 ms43.7%
UserManager.create_userdjango/contrib/auth/models.py:180365 ms43.7%
UserManager._create_userdjango/contrib/auth/models.py:167361 ms43.2%
UserManager._create_user_objectdjango/contrib/auth/models.py:160361 ms43.2%
make_passworddjango/contrib/auth/hashers.py:118361 ms43.2%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333361 ms43.2%
pbkdf2django/utils/crypto.py:93361 ms43.2%
1 smaller frames hidden
TestApproveConference.test_staff_approvesconfs/tests.py:1390 response = self.client.post(self.url)74 ms8.9%
Client.postdjango/test/client.py:116274 ms8.9%
RequestFactory.postdjango/test/client.py:49974 ms8.9%
RequestFactory.genericdjango/test/client.py:67174 ms8.9%
Client.requestdjango/test/client.py:109174 ms8.9%
ClientHandler.__call__django/test/client.py:17367 ms8.0%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6367 ms8.0%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10466 ms7.9%
WhiteNoise.add_fileswhitenoise/base.py:10866 ms7.9%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12037 ms4.4%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13133 ms3.9%
WhiteNoise.get_static_filewhitenoise/base.py:21232 ms3.8%
WhiteNoise.add_cache_headerswhitenoise/base.py:23427 ms3.3%
Headers.__setitem__<stdlib>/wsgiref/headers.py:6427 ms3.3%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:5027 ms3.3%
1 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
2 smaller frames hidden
1 smaller frames hidden
ClientHandler.__call__django/test/client.py:1866 ms0.7%
BaseHandler.get_responsedjango/core/handlers/base.py:1426 ms0.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:566 ms0.7%
MiddlewareMixin.__call__django/utils/deprecation.py:3806 ms0.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:566 ms0.7%
MiddlewareMixin.__call__django/utils/deprecation.py:3806 ms0.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:566 ms0.7%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms0.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms0.6%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1235 ms0.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms0.6%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1455 ms0.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms0.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms0.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms0.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms0.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms0.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms0.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms0.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms0.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms0.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms0.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms0.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms0.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms0.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms0.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms0.6%
BaseHandler._get_responsedjango/core/handlers/base.py:1995 ms0.6%
1 smaller frames hidden
1 smaller frames hidden
TestApproveConference.test_staff_approvesconfs/tests.py:1389 self.client.force_login(self.staff)18 ms2.2%
ClientMixin.force_logindjango/test/client.py:85818 ms2.2%
ClientMixin._logindjango/test/client.py:88912 ms1.5%
logindjango/contrib/auth/__init__.py:1899 ms1.1%
SessionBase.cycle_keydjango/contrib/sessions/backends/base.py:4375 ms0.6%
1 smaller frames hidden
1 smaller frames hidden
2 smaller frames hidden
3 smaller frames hidden
Estimated from 821 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
confs/tests.py:1372
self.normal = User.objects.create_user("bob", password="pw")
TestApproveConference.setUp
· Password hashing
|
370 ms |
|
confs/tests.py:1371
self.staff = User.objects.create_user("staff", password="pw", is_staff=True)
TestApproveConference.setUp
· Password hashing
|
365 ms |
|
confs/tests.py:1390
response = self.client.post(self.url)
TestApproveConference.test_staff_approves
· Libraries
|
72 ms |
|
confs/tests.py:1389
self.client.force_login(self.staff)
TestApproveConference.test_staff_approves
· Database
|
18 ms |
|
confs/tests.py:1391
self.conference.refresh_from_db()
TestApproveConference.test_staff_approves
· Database
|
2 ms |
|
confs/tests.py:1370
self.conference = baker.make(Conference, approved_at=None, tags="tag1")
TestApproveConference.setUp
· Database
|
1 ms |
|
confs/views.py:572
conference = get_object_or_404(Conference, slug=conference_slug)
approve_conference
· Database
|
1 ms |
|
confs/views.py:575
conference.save(update_fields=["approved_at"])
approve_conference
· Database
|
1 ms |
Fixtures
Exact setup time| _dj_autoclear_mailbox function | 0.21 ms |
| _template_string_if_invalid_marker function | 0.04 ms |
| _django_db_marker function | 0.04 ms |
| _django_isolate_apps function | 0.03 ms |
| _django_set_urlconf function | 0.03 ms |
| _live_server_helper function | 0.03 ms |
| _django_clear_site_cache function | 0.03 ms |
| monkeypatch function | 0.02 ms |
Database
28 queries · 27 msNo repeated queries.
Biggest pieces of work
|
call setUp
confs/tests.py:1372
|
736 ms |
|
call test body
confs/tests.py:1390
|
95 ms |
|
call _post_teardown
django/test/testcases.py:1243
|
3 ms |
| setup pytest internals | 0.96 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 | 835 ms | Profile |
| 2 weeks, 5 days ago | CI github-actions:test | passed | 1.20 s | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 1.22 s | Profile |
| 3 weeks ago | CI github-actions:test | passed | 744 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 1.14 s | Profile |
| 1 month ago | CI github-actions:test | passed | 1.24 s | Profile |
| 1 month ago | CI github-actions:test | passed | 831 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 1.10 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 875 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 772 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 2.19 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 1.74 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 1.52 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 914 ms | Run |