Tests / mastodon_auth/tests.py
MastodonLoginFormTests::test_cleans_instance_to_ascii_hostname
First seen 6 months, 1 week ago in b300f50
CI
github-actions:test
13 runs
Average
96 ms
median 78 ms
max 195 ms
max 195 ms
Phases
Setup 17 ms
Call 79 ms
Teardown 0.31 ms
Categories
Database 19 ms
Test code 0.08 ms
Other (Imports, pytest, Libraries, Deep copies, ...) 77 ms
5 database queries per run
Needs 11 MB of memory (max 13 MB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
setup14 ms21.2%
TestCase.setUpClassdjango/test/testcases.py:1426 cls.cls_atomics = cls._enter_atomics()14 ms21.2%
TestCase._enter_atomicsdjango/test/testcases.py:139914 ms21.2%
Atomic.__enter__django/db/transaction.py:21014 ms21.2%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:45414 ms21.2%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:30414 ms21.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2614 ms21.2%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:27914 ms21.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2614 ms21.2%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:25614 ms21.2%
DatabaseWrapper.get_new_connectionfedidevs/db/postgresql/base.py:39 return super().get_new_connection(conn_params)14 ms21.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2614 ms21.2%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:34514 ms21.2%
Connection.connectpsycopg/connection.py:10914 ms21.2%
wait_connpsycopg/waiting.py:1459 ms13.5%
BaseConnection._connect_genpsycopg/_connection_base.py:4399 ms13.5%
wait_connpsycopg/waiting.py:1363 ms3.9%
BaseConnection._connect_genpsycopg/_connection_base.py:4393 ms3.9%
wait_connpsycopg/waiting.py:1413 ms3.9%
EpollSelector.select<stdlib>/selectors.py:4523 ms3.9%
call52 ms78.4%
MastodonLoginFormTests.test_cleans_instance_to_ascii_hostnamemastodon_auth/tests.py:102 self.assertTrue(form.is_valid())47 ms70.8%
BaseForm.is_validdjango/forms/forms.py:20647 ms70.8%
BaseForm.errorsdjango/forms/forms.py:20147 ms70.8%
BaseForm.full_cleandjango/forms/forms.py:33747 ms70.8%
BaseForm._clean_fieldsdjango/forms/forms.py:34747 ms70.8%
MastodonLoginForm.clean_instancemastodon_auth/forms.py:27 ascii_hostname = idna.encode(hostname, uts46=True).decode("ascii")46 ms69.3%
encodeidna/core.py:77243 ms64.8%
uts46_remapidna/core.py:67443 ms64.8%
_find_and_load<frozen importlib._bootstrap>:135343 ms64.8%
_find_and_load_unlocked<frozen importlib._bootstrap>:124943 ms64.8%
_load_unlocked<frozen importlib._bootstrap>:85743 ms64.8%
_LoaderBasics.exec_module<frozen importlib._bootstrap_external>:74743 ms64.8%
SourceLoader.get_code<frozen importlib._bootstrap_external>:88142 ms63.3%
SourceLoader.source_to_code<frozen importlib._bootstrap_external>:81042 ms63.3%
_call_with_frames_removed<frozen importlib._bootstrap>:49142 ms63.3%
SourceLoader.get_code<frozen importlib._bootstrap_external>:8911.00 ms1.5%
_code_to_timestamp_pyc<frozen importlib._bootstrap_external>:5171.00 ms1.5%
encodeidna/core.py:7863 ms4.5%
alabelidna/core.py:5503 ms4.5%
_punycodeidna/core.py:1343 ms4.5%
search_function<stdlib>/encodings/__init__.py:963 ms4.5%
_find_and_load<frozen importlib._bootstrap>:13533 ms4.5%
_find_and_load_unlocked<frozen importlib._bootstrap>:12492 ms3.0%
_load_unlocked<frozen importlib._bootstrap>:8572 ms3.0%
_LoaderBasics.exec_module<frozen importlib._bootstrap_external>:7472 ms3.0%
SourceLoader.get_code<frozen importlib._bootstrap_external>:8812 ms3.0%
SourceLoader.source_to_code<frozen importlib._bootstrap_external>:8102 ms3.0%
_call_with_frames_removed<frozen importlib._bootstrap>:4912 ms3.0%
_find_and_load_unlocked<frozen importlib._bootstrap>:12381.00 ms1.5%
_find_spec<frozen importlib._bootstrap>:11641.00 ms1.5%
PathFinder.find_spec<frozen importlib._bootstrap_external>:12741.00 ms1.5%
PathFinder._get_spec<frozen importlib._bootstrap_external>:12481.00 ms1.5%
FileFinder.find_spec<frozen importlib._bootstrap_external>:13711.00 ms1.5%
MastodonLoginForm.clean_instancemastodon_auth/forms.py:21 hostname = parsed.hostname1.00 ms1.5%
_NetlocResultMixinBase.hostname<stdlib>/urllib/parse.py:1861.00 ms1.5%
SysMonitor.sysmon_py_startcoverage/sysmon.py:3281.00 ms1.5%
MastodonLoginFormTests.test_cleans_instance_to_ascii_hostnamemastodon_auth/tests.py:99 with self.subTest(instance=instance):2 ms3.0%
__create_fn__.<locals>.__init__<string>:51.00 ms1.5%
__init____init__:-11.00 ms1.5%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()2 ms3.0%
TestCase._fixture_teardowndjango/test/testcases.py:14971.00 ms1.5%
TestCase._should_check_constraintsdjango/test/testcases.py:15061.00 ms1.5%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:5041.00 ms1.5%
Cursor.executepsycopg/cursor.py:1131.00 ms1.5%
Connection.waitpsycopg/connection.py:4951.00 ms1.5%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061.00 ms1.5%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861.00 ms1.5%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781.00 ms1.5%
TestCase._fixture_teardowndjango/test/testcases.py:15001.00 ms1.5%
TestCase._rollback_atomicsdjango/test/testcases.py:14081.00 ms1.5%
Atomic.__exit__django/db/transaction.py:2951.00 ms1.5%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:261.00 ms1.5%
BaseDatabaseWrapper.savepoint_rollbackdjango/db/backends/base/base.py:4131.00 ms1.5%
BaseDatabaseWrapper._savepoint_rollbackdjango/db/backends/base/base.py:3711.00 ms1.5%
CursorWrapper.executedjango/db/backends/utils.py:791.00 ms1.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921.00 ms1.5%
CursorWrapper._executedjango/db/backends/utils.py:1031.00 ms1.5%
Cursor.executepsycopg/cursor.py:1131.00 ms1.5%
Connection.waitpsycopg/connection.py:4951.00 ms1.5%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061.00 ms1.5%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861.00 ms1.5%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781.00 ms1.5%
TransactionTestCase._pre_setupdjango/test/testcases.py:1167 cls._fixture_setup()1.00 ms1.5%
TestCase._fixture_setupdjango/test/testcases.py:14811.00 ms1.5%
TestCase._enter_atomicsdjango/test/testcases.py:13991.00 ms1.5%
Atomic.__enter__django/db/transaction.py:2231.00 ms1.5%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:261.00 ms1.5%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4001.00 ms1.5%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3671.00 ms1.5%
CursorWrapper.executedjango/db/backends/utils.py:791.00 ms1.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921.00 ms1.5%
CursorWrapper._executedjango/db/backends/utils.py:1031.00 ms1.5%
Cursor.executepsycopg/cursor.py:1131.00 ms1.5%
Connection.waitpsycopg/connection.py:4951.00 ms1.5%
Estimated from 63 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
mastodon_auth/forms.py:27
ascii_hostname = idna.encode(hostname, uts46=True).decode("ascii")
MastodonLoginForm.clean_instance
· Imports
|
46 ms |
|
fedidevs/db/postgresql/base.py:39
return super().get_new_connection(conn_params)
DatabaseWrapper.get_new_connection
· Database
|
14 ms |
|
mastodon_auth/tests.py:99
with self.subTest(instance=instance):
MastodonLoginFormTests.test_cleans_instance_to_ascii_hostname
· pytest
|
2 ms |
|
mastodon_auth/forms.py:21
hostname = parsed.hostname
MastodonLoginForm.clean_instance
· Libraries
|
1.00 ms |
Fixtures
Exact setup time| _unittest_setUpClass_fixture_MastodonLoginFormTests class | 13 ms |
| _django_setup_unittest class | 0.26 ms |
| _template_string_if_invalid_marker function | 0.08 ms |
| _django_isolate_apps function | 0.05 ms |
| _django_db_marker function | 0.04 ms |
| _live_server_helper function | 0.04 ms |
| _dj_autoclear_mailbox function | 0.04 ms |
| _django_set_urlconf function | 0.03 ms |
| _django_clear_site_cache function | 0.02 ms |
| monkeypatch function | 0.02 ms |
Database
5 queries · 1 msNo repeated queries.
Biggest pieces of work
|
call test body
mastodon_auth/tests.py:102
|
49 ms |
|
setup setUpClass
django/test/testcases.py:1426
|
14 ms |
|
call _post_teardown
django/test/testcases.py:1243
|
2 ms |
|
call _pre_setup
django/test/testcases.py:1167
|
1.00 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 | 66 ms | Profile |
| 2 weeks, 5 days ago | CI github-actions:test | passed | 69 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 86 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 77 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 85 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 78 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 69 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 86 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 61 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 65 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 195 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 155 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 159 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 61 ms | Run |