Tests / confs/tests.py
TestApproveConference::test_anonymous_redirected_to_login
First seen 3 weeks ago in 0c23747
CI
github-actions:test
11 runs
Average
1.03 s
median 775 ms
max 2.05 s
max 2.05 s
Phases
Setup 13 ms
Call 1.02 s
Teardown 0.30 ms
Categories
Password hashing 960 ms
Database 26 ms
Factories 0.64 ms
Test code 0.35 ms
App code 0.09 ms
Other (Libraries, pytest, Unsampled) 44 ms
9 database queries per run
Needs 300 KB of memory (max 1 MB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 7 hours ago ·
open run
setup8 ms1.3%
TestCase.setUpClassdjango/test/testcases.py:1426 cls.cls_atomics = cls._enter_atomics()7 ms1.2%
TestCase._enter_atomicsdjango/test/testcases.py:13997 ms1.2%
Atomic.__enter__django/db/transaction.py:2107 ms1.2%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:4547 ms1.2%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:3047 ms1.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:267 ms1.2%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:2797 ms1.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:267 ms1.2%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2567 ms1.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:267 ms1.2%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:3457 ms1.2%
Connection.connectpsycopg/connection.py:1097 ms1.2%
wait_connpsycopg/waiting.py:1415 ms0.8%
EpollSelector.select<stdlib>/selectors.py:4525 ms0.8%
1 smaller frames hidden
1 smaller frames hidden
call617 ms98.6%
TestApproveConference.setUpconfs/tests.py:1372 self.normal = User.objects.create_user("bob", password="pw")289 ms46.1%
UserManager.create_userdjango/contrib/auth/models.py:180289 ms46.1%
UserManager._create_userdjango/contrib/auth/models.py:167288 ms46.0%
UserManager._create_user_objectdjango/contrib/auth/models.py:160288 ms46.0%
make_passworddjango/contrib/auth/hashers.py:118288 ms46.0%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333288 ms46.0%
pbkdf2django/utils/crypto.py:93288 ms46.0%
1 smaller frames hidden
TestApproveConference.setUpconfs/tests.py:1371 self.staff = User.objects.create_user("staff", password="pw", is_staff=True)289 ms46.1%
UserManager.create_userdjango/contrib/auth/models.py:180289 ms46.1%
UserManager._create_userdjango/contrib/auth/models.py:167287 ms45.8%
UserManager._create_user_objectdjango/contrib/auth/models.py:160287 ms45.8%
make_passworddjango/contrib/auth/hashers.py:118287 ms45.8%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333287 ms45.8%
pbkdf2django/utils/crypto.py:93287 ms45.8%
1 smaller frames hidden
TestApproveConference.test_anonymous_redirected_to_loginconfs/tests.py:1385 self.conference.refresh_from_db()31 ms4.9%
Model.refresh_from_dbdjango/db/models/base.py:78831 ms4.9%
QuerySet.getdjango/db/models/query.py:70231 ms4.9%
QuerySet.__len__django/db/models/query.py:42131 ms4.9%
QuerySet._fetch_alldjango/db/models/query.py:226231 ms4.9%
ModelIterable.__iter__django/db/models/query.py:10330 ms4.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162530 ms4.7%
CursorWrapper.executedjango/db/backends/utils.py:7930 ms4.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9230 ms4.7%
CursorWrapper._executedjango/db/backends/utils.py:10530 ms4.7%
Cursor.executepsycopg/cursor.py:11330 ms4.7%
Connection.waitpsycopg/connection.py:49530 ms4.7%
1 smaller frames hidden
TestApproveConference.test_anonymous_redirected_to_loginconfs/tests.py:1383 response = self.client.post(self.url)5 ms0.8%
Client.postdjango/test/client.py:11625 ms0.8%
RequestFactory.postdjango/test/client.py:4995 ms0.8%
RequestFactory.genericdjango/test/client.py:6715 ms0.8%
Client.requestdjango/test/client.py:10915 ms0.8%
ClientHandler.__call__django/test/client.py:1735 ms0.8%
BaseHandler.load_middlewaredjango/core/handlers/base.py:635 ms0.8%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:1045 ms0.8%
2 smaller frames hidden
Estimated from 613 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
|
289 ms |
|
confs/tests.py:1371
self.staff = User.objects.create_user("staff", password="pw", is_staff=True)
TestApproveConference.setUp
· Password hashing
|
289 ms |
|
confs/tests.py:1385
self.conference.refresh_from_db()
TestApproveConference.test_anonymous_redirected_to_login
· Database
|
31 ms |
|
confs/tests.py:1383
response = self.client.post(self.url)
TestApproveConference.test_anonymous_redirected_to_login
· Libraries
|
5 ms |
|
confs/tests.py:1370
self.conference = baker.make(Conference, approved_at=None, tags="tag1")
TestApproveConference.setUp
· Database
|
3 ms |
Fixtures
Exact setup time| _unittest_setUpClass_fixture_TestApproveConference class | 7 ms |
| _django_setup_unittest class | 0.25 ms |
| _template_string_if_invalid_marker function | 0.04 ms |
| _django_db_marker function | 0.04 ms |
| _dj_autoclear_mailbox function | 0.03 ms |
| _live_server_helper function | 0.03 ms |
| _django_isolate_apps 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
9 queries · 7 msNo repeated queries.
Biggest pieces of work
|
call setUp
confs/tests.py:1372
|
581 ms |
|
call test body
confs/tests.py:1385
|
36 ms |
|
setup setUpClass
django/test/testcases.py:1426
|
7 ms |
|
setup __init__
__init__:-1
|
1 ms |
|
call _post_teardown
django/test/testcases.py:1243
|
1 ms |
Reliability
12 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 12 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 7 hours ago | CI github-actions:test | passed | 626 ms | Profile |
| 16 hours ago | CI github-actions:test | passed | 430 ms | Profile |
| 22 hours ago | CI github-actions:test | passed | 642 ms | Profile |
| 1 week, 5 days ago | CI github-actions:test | passed | 644 ms | Profile |
| 2 weeks, 2 days ago | CI github-actions:test | passed | 537 ms | Profile |
| 2 weeks, 2 days ago | CI github-actions:test | passed | 1.05 s | Profile |
| 2 weeks, 4 days ago | CI github-actions:test | passed | 935 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 775 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 1.95 s | Profile |
| 3 weeks ago | CI github-actions:test | passed | 2.05 s | Profile |
| 3 weeks ago | CI github-actions:test | passed | 1.72 s | Profile |
| 3 weeks ago | CI github-actions:test | passed | 950 ms | Run |