Tests / confs/tests.py
TestEditConference::test_edit_does_not_change_slug
First seen 1 month, 1 week ago in 0c23747
CI
github-actions:test
13 runs
Average
1.80 s
median 1.62 s
max 3.14 s
max 3.14 s
Phases
Setup 19 ms
Call 1.78 s
Teardown 0.33 ms
Categories
Password hashing 1.65 s
Database 69 ms
Factories 0.94 ms
Other (Libraries, pytest, Deep copies, Unsampled) 77 ms
31 database queries per run
Needs 7 KB of memory (max 64 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
setup19 ms1.6%
TestCase.setUpClassdjango/test/testcases.py:1426 cls.cls_atomics = cls._enter_atomics()16 ms1.4%
TestCase._enter_atomicsdjango/test/testcases.py:139916 ms1.4%
Atomic.__enter__django/db/transaction.py:21016 ms1.4%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:45416 ms1.4%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:30416 ms1.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2616 ms1.4%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:27916 ms1.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2616 ms1.4%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:25616 ms1.4%
DatabaseWrapper.get_new_connectionfedidevs/db/postgresql/base.py:39 return super().get_new_connection(conn_params)16 ms1.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2616 ms1.4%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:34516 ms1.4%
Connection.connectpsycopg/connection.py:10916 ms1.4%
wait_connpsycopg/waiting.py:1419 ms0.8%
EpollSelector.select<stdlib>/selectors.py:4528 ms0.7%
1 smaller frames hidden
wait_connpsycopg/waiting.py:1458 ms0.7%
BaseConnection._connect_genpsycopg/_connection_base.py:4396 ms0.5%
1 smaller frames hidden
2 smaller frames hidden
call1.14 s98.3%
TestEditConference.setUpconfs/tests.py:1175 self.owner = User.objects.create_user("owner", password="pw")369 ms32.0%
UserManager.create_userdjango/contrib/auth/models.py:180369 ms32.0%
UserManager._create_userdjango/contrib/auth/models.py:167365 ms31.6%
UserManager._create_user_objectdjango/contrib/auth/models.py:160365 ms31.6%
make_passworddjango/contrib/auth/hashers.py:118365 ms31.6%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333365 ms31.6%
pbkdf2django/utils/crypto.py:93365 ms31.6%
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1177 self.staff = User.objects.create_user("staff", password="pw", is_staff=True)358 ms31.0%
UserManager.create_userdjango/contrib/auth/models.py:180358 ms31.0%
UserManager._create_userdjango/contrib/auth/models.py:167357 ms30.9%
UserManager._create_user_objectdjango/contrib/auth/models.py:160357 ms30.9%
make_passworddjango/contrib/auth/hashers.py:118357 ms30.9%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333357 ms30.9%
pbkdf2django/utils/crypto.py:93357 ms30.9%
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1176 self.other = User.objects.create_user("other", password="pw")345 ms29.8%
UserManager.create_userdjango/contrib/auth/models.py:180345 ms29.8%
UserManager._create_userdjango/contrib/auth/models.py:167343 ms29.7%
UserManager._create_user_objectdjango/contrib/auth/models.py:160343 ms29.7%
make_passworddjango/contrib/auth/hashers.py:118343 ms29.7%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333343 ms29.7%
pbkdf2django/utils/crypto.py:93343 ms29.7%
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"))33 ms2.9%
Client.postdjango/test/client.py:116233 ms2.9%
RequestFactory.postdjango/test/client.py:49933 ms2.9%
RequestFactory.genericdjango/test/client.py:67133 ms2.9%
Client.requestdjango/test/client.py:109133 ms2.9%
ClientHandler.__call__django/test/client.py:18629 ms2.5%
BaseHandler.get_responsedjango/core/handlers/base.py:14229 ms2.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5629 ms2.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38029 ms2.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5629 ms2.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38029 ms2.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5629 ms2.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38029 ms2.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5629 ms2.5%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12329 ms2.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5629 ms2.5%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14529 ms2.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5629 ms2.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38029 ms2.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5629 ms2.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38029 ms2.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5629 ms2.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38029 ms2.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5629 ms2.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38029 ms2.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5629 ms2.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38029 ms2.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5629 ms2.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38029 ms2.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5629 ms2.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38029 ms2.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5629 ms2.5%
BaseHandler._get_responsedjango/core/handlers/base.py:19929 ms2.5%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:6229 ms2.5%
edit_conferenceconfs/views.py:54129 ms2.5%
ConferenceForm.__init__confs/views.py:420 super().__init__(*args, **kwargs)29 ms2.5%
BaseModelForm.__init__django/forms/models.py:37125 ms2.2%
model_to_dictdjango/forms/models.py:12025 ms2.2%
ManyToManyField.value_from_objectdjango/db/models/fields/related.py:213025 ms2.2%
QuerySet.__iter__django/db/models/query.py:43925 ms2.2%
QuerySet._fetch_alldjango/db/models/query.py:226225 ms2.2%
ModelIterable.__iter__django/db/models/query.py:10325 ms2.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162525 ms2.2%
CursorWrapper.executedjango/db/backends/utils.py:7925 ms2.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9225 ms2.2%
CursorWrapper._executedjango/db/backends/utils.py:10525 ms2.2%
Cursor.executepsycopg/cursor.py:11325 ms2.2%
Connection.waitpsycopg/connection.py:49525 ms2.2%
BaseCursor._execute_genpsycopg/_cursor_base.py:20624 ms2.1%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:28624 ms2.1%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:7824 ms2.1%
1 smaller frames hidden
1 smaller frames hidden
TestEditConference.test_edit_does_not_change_slugconfs/tests.py:1285 self.client.force_login(self.owner)23 ms2.0%
ClientMixin.force_logindjango/test/client.py:85823 ms2.0%
ClientMixin._logindjango/test/client.py:88910 ms0.9%
logindjango/contrib/auth/__init__.py:1897 ms0.6%
2 smaller frames hidden
ClientMixin._logindjango/test/client.py:8849 ms0.8%
ClientMixin.sessiondjango/test/client.py:8159 ms0.8%
SessionStore.savedjango/contrib/sessions/backends/db.py:1219 ms0.8%
1 smaller frames hidden
2 smaller frames hidden
Estimated from 1,112 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
|
369 ms |
|
confs/tests.py:1177
self.staff = User.objects.create_user("staff", password="pw", is_staff=True)
TestEditConference.setUp
· Password hashing
|
358 ms |
|
confs/tests.py:1176
self.other = User.objects.create_user("other", password="pw")
TestEditConference.setUp
· Password hashing
|
345 ms |
|
confs/views.py:420
super().__init__(*args, **kwargs)
ConferenceForm.__init__
· Database
|
29 ms |
|
confs/tests.py:1285
self.client.force_login(self.owner)
TestEditConference.test_edit_does_not_change_slug
· Database
|
23 ms |
|
fedidevs/db/postgresql/base.py:39
return super().get_new_connection(conn_params)
DatabaseWrapper.get_new_connection
· Database
|
16 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
|
4 ms |
|
confs/tests.py:1178
self.conference = baker.make(
TestEditConference.setUp
· Database
|
3 ms |
Fixtures
Exact setup time| _unittest_setUpClass_fixture_TestEditConference class | 18 ms |
| _django_setup_unittest class | 0.24 ms |
| _django_db_marker function | 0.05 ms |
| _template_string_if_invalid_marker function | 0.04 ms |
| _dj_autoclear_mailbox function | 0.04 ms |
| _django_isolate_apps function | 0.04 ms |
| _live_server_helper function | 0.03 ms |
| _django_set_urlconf function | 0.03 ms |
| _django_clear_site_cache function | 0.03 ms |
| monkeypatch function | 0.02 ms |
Database
31 queries · 43 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
|
1.08 s |
|
call test body
confs/tests.py:1286
|
56 ms |
|
setup setUpClass
django/test/testcases.py:1426
|
18 ms |
|
call _pre_setup
django/test/testcases.py:1167
|
4 ms |
|
setup __init__
__init__:-1
|
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 | 1.15 s | Profile |
| 2 weeks, 5 days ago | CI github-actions:test | passed | 1.76 s | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 1.78 s | Profile |
| 3 weeks ago | CI github-actions:test | passed | 1.01 s | Profile |
| 3 weeks ago | CI github-actions:test | passed | 1.47 s | Profile |
| 1 month ago | CI github-actions:test | passed | 1.94 s | Profile |
| 1 month ago | CI github-actions:test | passed | 1.52 s | Profile |
| 1 month ago | CI github-actions:test | passed | 1.62 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 1.47 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 1.15 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 2.50 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 3.14 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 2.86 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 1.47 s | Run |