Tests / confs/tests.py
TestEditConference::test_edit_does_not_change_slug
First seen 13 hours ago in 0c23747
CI
github-actions:test
4 runs
Average
2.41 s
median 2.68 s
max 3.14 s
max 3.14 s
Phases
Setup 23 ms
Call 2.39 s
Teardown 0.32 ms
Categories
Password hashing 2.23 s
Database 65 ms
Factories 0.55 ms
Other (Libraries, pytest, Deep copies, Unsampled) 116 ms
31 database queries per run
Needs 17 KB of memory (max 64 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 7 hours ago ·
open run
setup10 ms0.9%
TestCase.setUpClassdjango/test/testcases.py:1426 cls.cls_atomics = cls._enter_atomics()9 ms0.8%
TestCase._enter_atomicsdjango/test/testcases.py:13999 ms0.8%
Atomic.__enter__django/db/transaction.py:2109 ms0.8%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:4549 ms0.8%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:3049 ms0.8%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms0.8%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:2799 ms0.8%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms0.8%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2569 ms0.8%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms0.8%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:3459 ms0.8%
Connection.connectpsycopg/connection.py:1099 ms0.8%
wait_connpsycopg/waiting.py:1458 ms0.7%
BaseConnection._connect_genpsycopg/_connection_base.py:4398 ms0.7%
1 smaller frames hidden
call1.14 s99.1%
TestEditConference.setUpconfs/tests.py:1177 self.staff = User.objects.create_user("staff", password="pw", is_staff=True)354 ms30.8%
UserManager.create_userdjango/contrib/auth/models.py:180354 ms30.8%
UserManager._create_userdjango/contrib/auth/models.py:167353 ms30.7%
UserManager._create_user_objectdjango/contrib/auth/models.py:160353 ms30.7%
make_passworddjango/contrib/auth/hashers.py:118353 ms30.7%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333353 ms30.7%
pbkdf2django/utils/crypto.py:93353 ms30.7%
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1176 self.other = User.objects.create_user("other", password="pw")343 ms29.8%
UserManager.create_userdjango/contrib/auth/models.py:180343 ms29.8%
UserManager._create_userdjango/contrib/auth/models.py:167342 ms29.7%
UserManager._create_user_objectdjango/contrib/auth/models.py:160342 ms29.7%
make_passworddjango/contrib/auth/hashers.py:118342 ms29.7%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333342 ms29.7%
pbkdf2django/utils/crypto.py:93342 ms29.7%
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1175 self.owner = User.objects.create_user("owner", password="pw")334 ms29.0%
UserManager.create_userdjango/contrib/auth/models.py:180334 ms29.0%
UserManager._create_userdjango/contrib/auth/models.py:167331 ms28.8%
UserManager._create_user_objectdjango/contrib/auth/models.py:160331 ms28.8%
make_passworddjango/contrib/auth/hashers.py:118331 ms28.8%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333331 ms28.8%
pbkdf2django/utils/crypto.py:93331 ms28.8%
1 smaller frames hidden
TestEditConference.test_edit_does_not_change_slugconfs/tests.py:1286 self.client.post(self.url, self._post_data(name="A Totally Different Name"))89 ms7.8%
Client.postdjango/test/client.py:116289 ms7.8%
RequestFactory.postdjango/test/client.py:49989 ms7.8%
RequestFactory.genericdjango/test/client.py:67189 ms7.8%
Client.requestdjango/test/client.py:109189 ms7.8%
ClientHandler.__call__django/test/client.py:17370 ms6.1%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6370 ms6.1%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10468 ms5.9%
WhiteNoise.add_fileswhitenoise/base.py:10868 ms5.9%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12059 ms5.1%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13159 ms5.1%
WhiteNoise.get_static_filewhitenoise/base.py:21742 ms3.7%
StaticFile.__init__whitenoise/responders.py:7317 ms1.5%
StaticFile.__init__whitenoise/responders.py:769 ms0.8%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1886 ms0.5%
Headers.__contains__<stdlib>/wsgiref/headers.py:876 ms0.5%
2 smaller frames hidden
StaticFile.__init__whitenoise/responders.py:779 ms0.8%
2 smaller frames hidden
WhiteNoise.get_static_filewhitenoise/base.py:21215 ms1.3%
WhiteNoise.add_cache_headerswhitenoise/base.py:23315 ms1.3%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:17612 ms1.0%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:19712 ms1.0%
URLMixin.urldebug_toolbar/panels/staticfiles.py:2011 ms1.0%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:23511 ms1.0%
1 smaller frames hidden
2 smaller frames hidden
2 smaller frames hidden
WhiteNoise.update_files_dictionarywhitenoise/base.py:1158 ms0.7%
scantreewhitenoise/base.py:2717 ms0.6%
scantreewhitenoise/base.py:2716 ms0.5%
scantreewhitenoise/base.py:2716 ms0.5%
1 smaller frames hidden
1 smaller frames hidden
2 smaller frames hidden
ClientHandler.__call__django/test/client.py:18619 ms1.7%
BaseHandler.get_responsedjango/core/handlers/base.py:14218 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms1.6%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12318 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms1.6%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14518 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms1.6%
BaseHandler._get_responsedjango/core/handlers/base.py:19918 ms1.6%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:6215 ms1.3%
edit_conferenceconfs/views.py:5417 ms0.6%
ConferenceForm.__init__confs/views.py:420 super().__init__(*args, **kwargs)7 ms0.6%
3 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
TestEditConference.test_edit_does_not_change_slugconfs/tests.py:1285 self.client.force_login(self.owner)13 ms1.1%
ClientMixin.force_logindjango/test/client.py:85813 ms1.1%
ClientMixin._logindjango/test/client.py:8898 ms0.7%
2 smaller frames hidden
4 smaller frames hidden
Estimated from 1,145 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
|
354 ms |
|
confs/tests.py:1176
self.other = User.objects.create_user("other", password="pw")
TestEditConference.setUp
· Password hashing
|
343 ms |
|
confs/tests.py:1175
self.owner = User.objects.create_user("owner", password="pw")
TestEditConference.setUp
· Password hashing
|
334 ms |
|
confs/tests.py:1286
self.client.post(self.url, self._post_data(name="A Totally Different Name"))
TestEditConference.test_edit_does_not_change_slug
· Libraries
|
74 ms |
|
confs/tests.py:1285
self.client.force_login(self.owner)
TestEditConference.test_edit_does_not_change_slug
· Database
|
13 ms |
|
confs/views.py:420
super().__init__(*args, **kwargs)
ConferenceForm.__init__
· Database
|
7 ms |
|
confs/views.py:543
form.save()
edit_conference
· Database
|
4 ms |
|
confs/views.py:536
conference = get_object_or_404(Conference, slug=conference_slug)
edit_conference
· Database
|
3 ms |
|
confs/tests.py:1287
self.conference.refresh_from_db()
TestEditConference.test_edit_does_not_change_slug
· Database
|
2 ms |
|
confs/tests.py:1178
self.conference = baker.make(
TestEditConference.setUp
· Database
|
1 ms |
Fixtures
Exact setup time| _unittest_setUpClass_fixture_TestEditConference class | 9 ms |
| _django_setup_unittest class | 0.53 ms |
| _template_string_if_invalid_marker function | 0.05 ms |
| _django_db_marker function | 0.04 ms |
| _dj_autoclear_mailbox function | 0.04 ms |
| _live_server_helper function | 0.03 ms |
| _django_clear_site_cache function | 0.03 ms |
| _django_isolate_apps function | 0.03 ms |
| _django_set_urlconf function | 0.03 ms |
| monkeypatch function | 0.02 ms |
Database
31 queries · 27 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
|
1.03 s |
|
call test body
confs/tests.py:1286
|
104 ms |
|
setup setUpClass
django/test/testcases.py:1426
|
9 ms |
|
call _post_teardown
django/test/testcases.py:1243
|
2 ms |
| setup pytest internals | 1 ms |
Reliability
5 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 5 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 7 hours ago | CI github-actions:test | passed | 1.15 s | Profile |
| 7 hours ago | CI github-actions:test | passed | 2.50 s | Profile |
| 7 hours ago | CI github-actions:test | passed | 3.14 s | Profile |
| 12 hours ago | CI github-actions:test | passed | 2.86 s | Profile |
| 13 hours ago | CI github-actions:test | passed | 1.47 s | Run |