Tests / confs/tests.py
TestConferenceApprovalVisibility::test_anonymous_sees_only_approved
First seen 3 weeks ago in 0c23747
CI
github-actions:test
11 runs
Average
698 ms
median 694 ms
max 890 ms
max 890 ms
Phases
Setup 9 ms
Call 689 ms
Teardown 0.29 ms
Categories
Password hashing 622 ms
Database 33 ms
Factories 0.38 ms
Test code 0.10 ms
Other (Libraries, Templates, pytest, Unsampled) 42 ms
18 database queries per run
Needs 952 KB of memory (max 2 MB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 7 hours ago ·
open run
setup9 ms1.3%
TestCase.setUpClassdjango/test/testcases.py:1426 cls.cls_atomics = cls._enter_atomics()7 ms1.0%
TestCase._enter_atomicsdjango/test/testcases.py:13997 ms1.0%
Atomic.__enter__django/db/transaction.py:2107 ms1.0%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:4547 ms1.0%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:3047 ms1.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:267 ms1.0%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:2797 ms1.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:267 ms1.0%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2567 ms1.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:267 ms1.0%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:3457 ms1.0%
Connection.connectpsycopg/connection.py:1097 ms1.0%
wait_connpsycopg/waiting.py:1414 ms0.6%
EpollSelector.select<stdlib>/selectors.py:4524 ms0.6%
1 smaller frames hidden
1 smaller frames hidden
call678 ms98.7%
TestConferenceApprovalVisibility.setUpconfs/tests.py:1316 self.owner = User.objects.create_user("owner", password="pw")311 ms45.2%
UserManager.create_userdjango/contrib/auth/models.py:180311 ms45.2%
UserManager._create_userdjango/contrib/auth/models.py:167309 ms44.9%
UserManager._create_user_objectdjango/contrib/auth/models.py:160309 ms44.9%
make_passworddjango/contrib/auth/hashers.py:118309 ms44.9%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333309 ms44.9%
pbkdf2django/utils/crypto.py:93309 ms44.9%
1 smaller frames hidden
TestConferenceApprovalVisibility.setUpconfs/tests.py:1317 self.other = User.objects.create_user("other", password="pw")310 ms45.1%
UserManager.create_userdjango/contrib/auth/models.py:180310 ms45.1%
UserManager._create_userdjango/contrib/auth/models.py:167309 ms44.9%
UserManager._create_user_objectdjango/contrib/auth/models.py:160309 ms44.9%
make_passworddjango/contrib/auth/hashers.py:118309 ms44.9%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333309 ms44.9%
pbkdf2django/utils/crypto.py:93309 ms44.9%
1 smaller frames hidden
TestConferenceApprovalVisibility.test_anonymous_sees_only_approvedconfs/tests.py:1337 response = self.client.get(reverse("conferences"))45 ms6.5%
Client.getdjango/test/client.py:113344 ms6.4%
RequestFactory.getdjango/test/client.py:47544 ms6.4%
RequestFactory.genericdjango/test/client.py:67144 ms6.4%
Client.requestdjango/test/client.py:109144 ms6.4%
ClientHandler.__call__django/test/client.py:18629 ms4.2%
BaseHandler.get_responsedjango/core/handlers/base.py:14229 ms4.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5629 ms4.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38029 ms4.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5629 ms4.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38029 ms4.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5629 ms4.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38029 ms4.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5629 ms4.2%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12329 ms4.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5629 ms4.2%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14529 ms4.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5629 ms4.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38029 ms4.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5629 ms4.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38029 ms4.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5629 ms4.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38029 ms4.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5629 ms4.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38029 ms4.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5629 ms4.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38029 ms4.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5629 ms4.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38029 ms4.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5629 ms4.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38029 ms4.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5629 ms4.2%
BaseHandler._get_responsedjango/core/handlers/base.py:19929 ms4.2%
conferencesconfs/views.py:128 return render(29 ms4.2%
renderdjango/shortcuts.py:2729 ms4.2%
render_to_stringdjango/template/loader.py:6229 ms4.2%
Template.renderdjango/template/backends/django.py:10729 ms4.2%
Template.renderdjango/template/base.py:17529 ms4.2%
instrumented_test_renderdjango/test/utils.py:11329 ms4.2%
NodeList.renderdjango/template/base.py:110829 ms4.2%
Node.render_annotateddjango/template/base.py:106929 ms4.2%
ExtendsNode.renderdjango/template/loader_tags.py:16029 ms4.2%
instrumented_test_renderdjango/test/utils.py:11329 ms4.2%
NodeList.renderdjango/template/base.py:110829 ms4.2%
Node.render_annotateddjango/template/base.py:106929 ms4.2%
BlockNode.renderdjango/template/loader_tags.py:6617 ms2.5%
NodeList.renderdjango/template/base.py:110817 ms2.5%
Node.render_annotateddjango/template/base.py:106917 ms2.5%
IfNode.renderdjango/template/defaulttags.py:3329 ms1.2%
QuerySet.__bool__django/db/models/query.py:4539 ms1.2%
QuerySet._fetch_alldjango/db/models/query.py:22625 ms0.8%
ModelIterable.__iter__django/db/models/query.py:1035 ms0.8%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16255 ms0.8%
CursorWrapper.executedjango/db/backends/utils.py:795 ms0.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:925 ms0.8%
CursorWrapper._executedjango/db/backends/utils.py:1055 ms0.8%
Cursor.executepsycopg/cursor.py:1135 ms0.8%
Connection.waitpsycopg/connection.py:4955 ms0.8%
1 smaller frames hidden
SimpleNode.renderdjango/template/library.py:3435 ms0.8%
heroicon_outlineheroicons/templatetags/heroicons.py:235 ms0.8%
_render_iconheroicons/templatetags/heroicons.py:415 ms0.8%
_render_iconheroicons/__init__.py:475 ms0.8%
_load_iconheroicons/__init__.py:185 ms0.8%
ZipFile.__init__<stdlib>/zipfile/__init__.py:15055 ms0.8%
2 smaller frames hidden
IfNode.renderdjango/template/defaulttags.py:33310 ms1.4%
NodeList.renderdjango/template/base.py:110810 ms1.4%
Node.render_annotateddjango/template/base.py:106910 ms1.4%
SimpleNode.renderdjango/template/library.py:3439 ms1.2%
heroicon_outlineheroicons/templatetags/heroicons.py:239 ms1.2%
_render_iconheroicons/templatetags/heroicons.py:419 ms1.2%
_render_iconheroicons/__init__.py:479 ms1.2%
_load_iconheroicons/__init__.py:187 ms1.1%
ZipFile.__init__<stdlib>/zipfile/__init__.py:15057 ms1.1%
1 smaller frames hidden
1 smaller frames hidden
2 smaller frames hidden
ClientHandler.__call__django/test/client.py:17315 ms2.2%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6315 ms2.2%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10415 ms2.2%
WhiteNoise.add_fileswhitenoise/base.py:10815 ms2.2%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12011 ms1.5%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13111 ms1.5%
WhiteNoise.get_static_filewhitenoise/base.py:2179 ms1.2%
StaticFile.__init__whitenoise/responders.py:774 ms0.6%
2 smaller frames hidden
2 smaller frames hidden
WhiteNoise.update_files_dictionarywhitenoise/base.py:1154 ms0.6%
1 smaller frames hidden
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()10 ms1.4%
TestCase._fixture_teardowndjango/test/testcases.py:149810 ms1.4%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:49510 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:7910 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9210 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:10310 ms1.4%
Cursor.executepsycopg/cursor.py:11310 ms1.4%
Connection.waitpsycopg/connection.py:49510 ms1.4%
2 smaller frames hidden
Estimated from 646 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
confs/tests.py:1316
self.owner = User.objects.create_user("owner", password="pw")
TestConferenceApprovalVisibility.setUp
· Password hashing
|
311 ms |
|
confs/tests.py:1317
self.other = User.objects.create_user("other", password="pw")
TestConferenceApprovalVisibility.setUp
· Password hashing
|
310 ms |
|
confs/views.py:128
return render(
conferences
· Templates
|
29 ms |
|
confs/tests.py:1337
response = self.client.get(reverse("conferences"))
TestConferenceApprovalVisibility.test_anonymous_sees_only_approved
· Libraries
|
16 ms |
|
confs/tests.py:1318
self.approved = baker.make(
TestConferenceApprovalVisibility.setUp
· Database
|
2 ms |
|
confs/tests.py:1326
self.pending = baker.make(
TestConferenceApprovalVisibility.setUp
· Database
|
1 ms |
Fixtures
Exact setup time| _unittest_setUpClass_fixture_TestConferenceApprovalVisibility class | 8 ms |
| _django_setup_unittest class | 0.33 ms |
| _template_string_if_invalid_marker function | 0.04 ms |
| _django_db_marker function | 0.04 ms |
| _dj_autoclear_mailbox function | 0.04 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
18 queries · 21 ms
Repeated queries are usually N+1 lookups: fetch them once with select_related / prefetch_related (or selectinload).
3×
SELECT "confs_conference"."id", "confs_conference"."name", "confs_conference"."slug", "confs_conference"."location", "confs_conference"."start_date", "confs_conference"."end_date", "confs_conference"."time_zone", "confs_conference"."archived_date", "confs_conference"."approved_at", "confs_conferenc…
Biggest pieces of work
|
call setUp
confs/tests.py:1316
|
624 ms |
|
call test body
confs/tests.py:1337
|
45 ms |
|
call _post_teardown
django/test/testcases.py:1243
|
10 ms |
|
setup setUpClass
django/test/testcases.py:1426
|
8 ms |
| setup pytest internals | 0.98 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 | 687 ms | Profile |
| 16 hours ago | CI github-actions:test | passed | 462 ms | Profile |
| 22 hours ago | CI github-actions:test | passed | 688 ms | Profile |
| 1 week, 5 days ago | CI github-actions:test | passed | 699 ms | Profile |
| 2 weeks, 2 days ago | CI github-actions:test | passed | 864 ms | Profile |
| 2 weeks, 2 days ago | CI github-actions:test | passed | 792 ms | Profile |
| 2 weeks, 4 days ago | CI github-actions:test | passed | 694 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 535 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 699 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 669 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 890 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 647 ms | Run |