Tests / confs/tests.py
TestEditConference::test_owner_sees_edit_button_on_approved_detail
First seen 1 month, 1 week ago in 0c23747
CI
github-actions:test
13 runs
Average
1.26 s
median 959 ms
max 3.15 s
max 3.15 s
Phases
Setup 2 ms
Call 1.25 s
Teardown 0.29 ms
Categories
Password hashing 1.16 s
Database 37 ms
App code 0.48 ms
Factories 0.29 ms
Test code 0.15 ms
Other (Libraries, Templates, pytest, Unsampled) 55 ms
33 database queries per run
Needs 177 KB of memory (max 464 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
call766 ms99.9%
TestEditConference.setUpconfs/tests.py:1177 self.staff = User.objects.create_user("staff", password="pw", is_staff=True)248 ms32.3%
UserManager.create_userdjango/contrib/auth/models.py:180248 ms32.3%
UserManager._create_userdjango/contrib/auth/models.py:167247 ms32.2%
UserManager._create_user_objectdjango/contrib/auth/models.py:160247 ms32.2%
make_passworddjango/contrib/auth/hashers.py:118246 ms32.0%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333246 ms32.0%
pbkdf2django/utils/crypto.py:93246 ms32.0%
1 smaller frames hidden
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1175 self.owner = User.objects.create_user("owner", password="pw")241 ms31.5%
UserManager.create_userdjango/contrib/auth/models.py:180241 ms31.5%
UserManager._create_userdjango/contrib/auth/models.py:167240 ms31.4%
UserManager._create_user_objectdjango/contrib/auth/models.py:160240 ms31.4%
make_passworddjango/contrib/auth/hashers.py:118240 ms31.4%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333240 ms31.4%
pbkdf2django/utils/crypto.py:93240 ms31.4%
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1176 self.other = User.objects.create_user("other", password="pw")240 ms31.4%
UserManager.create_userdjango/contrib/auth/models.py:180240 ms31.4%
UserManager._create_userdjango/contrib/auth/models.py:167240 ms31.4%
UserManager._create_user_objectdjango/contrib/auth/models.py:160240 ms31.4%
make_passworddjango/contrib/auth/hashers.py:118240 ms31.4%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333240 ms31.4%
pbkdf2django/utils/crypto.py:93240 ms31.4%
TestEditConference.test_owner_sees_edit_button_on_approved_detailconfs/tests.py:1264 response = self.client.get(reverse("conference", kwargs={"conference_slug": self.conference.slug}))28 ms3.6%
Client.getdjango/test/client.py:113328 ms3.6%
RequestFactory.getdjango/test/client.py:47528 ms3.6%
RequestFactory.genericdjango/test/client.py:67128 ms3.6%
Client.requestdjango/test/client.py:109128 ms3.6%
ClientHandler.__call__django/test/client.py:18619 ms2.4%
BaseHandler.get_responsedjango/core/handlers/base.py:14219 ms2.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5619 ms2.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38019 ms2.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5619 ms2.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38019 ms2.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5619 ms2.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38019 ms2.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5619 ms2.4%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12319 ms2.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5619 ms2.4%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14519 ms2.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5619 ms2.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38019 ms2.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5619 ms2.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38019 ms2.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5619 ms2.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38019 ms2.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5619 ms2.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38019 ms2.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5619 ms2.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38019 ms2.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5619 ms2.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38019 ms2.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5619 ms2.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38019 ms2.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5619 ms2.4%
BaseHandler._get_responsedjango/core/handlers/base.py:19919 ms2.4%
conferenceconfs/views.py:16819 ms2.4%
_conference_detailconfs/views.py:268 page_obj = paginator.get_page(page_number)5 ms0.7%
Paginator.get_pagedjango/core/paginator.py:1614 ms0.5%
Paginator.validate_numberdjango/core/paginator.py:1534 ms0.5%
cached_property.__get__django/utils/functional.py:474 ms0.5%
Paginator.num_pagesdjango/core/paginator.py:1884 ms0.5%
cached_property.__get__django/utils/functional.py:474 ms0.5%
Paginator.countdjango/core/paginator.py:1824 ms0.5%
QuerySet.countdjango/db/models/query.py:6774 ms0.5%
Query.get_countdjango/db/models/sql/query.py:6574 ms0.5%
Query.get_aggregationdjango/db/models/sql/query.py:6394 ms0.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16254 ms0.5%
CursorWrapper.executedjango/db/backends/utils.py:794 ms0.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:924 ms0.5%
CursorWrapper._executedjango/db/backends/utils.py:1054 ms0.5%
Cursor.executepsycopg/cursor.py:1134 ms0.5%
Connection.waitpsycopg/connection.py:4954 ms0.5%
1 smaller frames hidden
_conference_detailconfs/views.py:296 return render(4 ms0.5%
renderdjango/shortcuts.py:274 ms0.5%
6 smaller frames hidden
ClientHandler.__call__django/test/client.py:1739 ms1.2%
BaseHandler.load_middlewaredjango/core/handlers/base.py:639 ms1.2%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:1049 ms1.2%
WhiteNoise.add_fileswhitenoise/base.py:1089 ms1.2%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1207 ms0.9%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1317 ms0.9%
WhiteNoise.get_static_filewhitenoise/base.py:2176 ms0.8%
1 smaller frames hidden
1 smaller frames hidden
TestEditConference.test_owner_sees_edit_button_on_approved_detailconfs/tests.py:1263 self.client.force_login(self.owner)5 ms0.7%
ClientMixin.force_logindjango/test/client.py:8585 ms0.7%
1 smaller frames hidden
Estimated from 739 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
confs/tests.py:1177
self.staff = User.objects.create_user("staff", password="pw", is_staff=True)
TestEditConference.setUp
· Password hashing
|
248 ms |
|
confs/tests.py:1175
self.owner = User.objects.create_user("owner", password="pw")
TestEditConference.setUp
· Password hashing
|
241 ms |
|
confs/tests.py:1176
self.other = User.objects.create_user("other", password="pw")
TestEditConference.setUp
· Password hashing
|
240 ms |
|
confs/tests.py:1264
response = self.client.get(reverse("conference", kwargs={"conference_slug": self.conference.slug}))
TestEditConference.test_owner_sees_edit_button_on_approved_detail
· Libraries
|
9 ms |
|
confs/views.py:268
page_obj = paginator.get_page(page_number)
_conference_detail
· Database
|
5 ms |
|
confs/tests.py:1263
self.client.force_login(self.owner)
TestEditConference.test_owner_sees_edit_button_on_approved_detail
· Database
|
5 ms |
|
confs/views.py:296
return render(
_conference_detail
· Templates
|
4 ms |
|
confs/views.py:226
counts_dict = {c["created_at_date"].date(): c["count"] for c in counts}
_conference_detail
· Database
|
3 ms |
|
confs/tests.py:1178
self.conference = baker.make(
TestEditConference.setUp
· Factories
|
2 ms |
|
confs/views.py:276
current_account = next((account for account in account_counts if account.account.id == account_id), None)
_conference_detail.<locals>.<genexpr>
· Database
|
2 ms |
Fixtures
Exact setup time| _dj_autoclear_mailbox function | 0.04 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
33 queries · 18 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:1177
|
732 ms |
|
call test body
confs/tests.py:1264
|
33 ms |
| call pytest internals | 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 | 767 ms | Profile |
| 2 weeks, 5 days ago | CI github-actions:test | passed | 983 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 957 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 632 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 959 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 940 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 1.23 s | Profile |
| 1 month ago | CI github-actions:test | passed | 952 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 1.38 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 778 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 3.15 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 981 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 2.62 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 1.37 s | Run |