Tests / confs/tests.py
TestResolveLegacyAccountsAndPosts::test_match_existing_account_by_id_and_instance_when_url_differs
First seen 14 hours ago in 0c23747
CI
github-actions:test
4 runs
Average
16 ms
median 13 ms
max 30 ms
max 30 ms
Phases
Setup 1 ms
Call 14 ms
Teardown 0.27 ms
Categories
Database 14 ms
Factories 0.35 ms
Other (Unsampled, pytest) 2 ms
9 database queries per run
Needs 0 KB of memory (max 0 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 8 hours ago ·
open run
call10 ms92.1%
TransactionTestCase._pre_setupdjango/test/testcases.py:1167 cls._fixture_setup()3 ms30.7%
TestCase._fixture_setupdjango/test/testcases.py:14813 ms30.7%
TestCase._enter_atomicsdjango/test/testcases.py:13993 ms30.7%
Atomic.__enter__django/db/transaction.py:2233 ms30.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:263 ms30.7%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4003 ms30.7%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3673 ms30.7%
CursorWrapper.executedjango/db/backends/utils.py:793 ms30.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms30.7%
CursorWrapper._executedjango/db/backends/utils.py:1033 ms30.7%
Cursor.executepsycopg/cursor.py:1133 ms30.7%
Connection.waitpsycopg/connection.py:4953 ms30.7%
TestResolveLegacyAccountsAndPosts.test_match_existing_account_by_id_and_instance_when_url_differsconfs/tests.py:277 existing = baker.make(3 ms24.6%
makemodel_bakery/baker.py:1753 ms24.6%
Baker.makemodel_bakery/baker.py:4543 ms24.6%
Baker._makemodel_bakery/baker.py:5292 ms18.4%
Baker.generate_valuemodel_bakery/baker.py:10191 ms12.3%
gen_stringmodel_bakery/random_gen.py:2701 ms12.3%
gen_string.<locals>.<genexpr>model_bakery/random_gen.py:2701 ms12.3%
Random.choice<stdlib>/random.py:3541 ms12.3%
Baker.generate_valuemodel_bakery/baker.py:9760.69 ms6.1%
Field.has_defaultdjango/db/models/fields/__init__.py:10560.69 ms6.1%
Baker._makemodel_bakery/baker.py:5420.69 ms6.1%
Baker.instancemodel_bakery/baker.py:6590.69 ms6.1%
Model.savedjango/db/models/base.py:9040.69 ms6.1%
Model.save_basedjango/db/models/base.py:9960.69 ms6.1%
Model._save_tabledjango/db/models/base.py:11990.69 ms6.1%
Model._do_insertdjango/db/models/base.py:12510.69 ms6.1%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:870.69 ms6.1%
QuerySet._insertdjango/db/models/query.py:21410.69 ms6.1%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19360.69 ms6.1%
CursorWrapper.executedjango/db/backends/utils.py:790.69 ms6.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.69 ms6.1%
CursorWrapper._executedjango/db/backends/utils.py:1050.69 ms6.1%
Cursor.executepsycopg/cursor.py:1130.69 ms6.1%
Connection.waitpsycopg/connection.py:4950.69 ms6.1%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()2 ms18.4%
TestCase._fixture_teardowndjango/test/testcases.py:15001 ms12.3%
TestCase._rollback_atomicsdjango/test/testcases.py:14081 ms12.3%
Atomic.__exit__django/db/transaction.py:2950.69 ms6.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:260.69 ms6.1%
BaseDatabaseWrapper.savepoint_rollbackdjango/db/backends/base/base.py:4130.69 ms6.1%
BaseDatabaseWrapper._savepoint_rollbackdjango/db/backends/base/base.py:3710.69 ms6.1%
CursorWrapper.executedjango/db/backends/utils.py:790.69 ms6.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.69 ms6.1%
CursorWrapper._executedjango/db/backends/utils.py:1030.69 ms6.1%
Cursor.executepsycopg/cursor.py:1130.69 ms6.1%
Connection.waitpsycopg/connection.py:4950.69 ms6.1%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.69 ms6.1%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.69 ms6.1%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.69 ms6.1%
Atomic.__exit__django/db/transaction.py:2980.69 ms6.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:260.69 ms6.1%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4310.69 ms6.1%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3750.69 ms6.1%
CursorWrapper.executedjango/db/backends/utils.py:790.69 ms6.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.69 ms6.1%
CursorWrapper._executedjango/db/backends/utils.py:1030.69 ms6.1%
Cursor.executepsycopg/cursor.py:1130.69 ms6.1%
Connection.waitpsycopg/connection.py:4950.69 ms6.1%
TestCase._fixture_teardowndjango/test/testcases.py:14970.69 ms6.1%
TestCase._should_check_constraintsdjango/test/testcases.py:15060.69 ms6.1%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:5040.69 ms6.1%
Cursor.executepsycopg/cursor.py:1130.69 ms6.1%
Connection.waitpsycopg/connection.py:4950.69 ms6.1%
TestResolveLegacyAccountsAndPosts.test_match_existing_account_by_id_and_instance_when_url_differsconfs/tests.py:2841 ms12.3%
_resolve_accountsconfs/migrations/0033_remove_legacy_conference_tables.py:2270.69 ms6.1%
_index_accountsconfs/migrations/0033_remove_legacy_conference_tables.py:194 for account in accounts:0.69 ms6.1%
QuerySet.__iter__django/db/models/query.py:4390.69 ms6.1%
QuerySet._fetch_alldjango/db/models/query.py:22620.69 ms6.1%
ModelIterable.__iter__django/db/models/query.py:1030.69 ms6.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16250.69 ms6.1%
CursorWrapper.executedjango/db/backends/utils.py:790.69 ms6.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.69 ms6.1%
CursorWrapper._executedjango/db/backends/utils.py:1050.69 ms6.1%
Cursor.executepsycopg/cursor.py:1130.69 ms6.1%
Connection.waitpsycopg/connection.py:4950.69 ms6.1%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.69 ms6.1%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.69 ms6.1%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.69 ms6.1%
_resolve_accountsconfs/migrations/0033_remove_legacy_conference_tables.py:233 for account in _filter_by_pairs(lookup, "account_id", "instance", chunk):0.69 ms6.1%
QuerySet.__iter__django/db/models/query.py:4390.69 ms6.1%
QuerySet._fetch_alldjango/db/models/query.py:22620.69 ms6.1%
ModelIterable.__iter__django/db/models/query.py:1030.69 ms6.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16250.69 ms6.1%
CursorWrapper.executedjango/db/backends/utils.py:790.69 ms6.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.69 ms6.1%
CursorWrapper._executedjango/db/backends/utils.py:1050.69 ms6.1%
Cursor.executepsycopg/cursor.py:1130.69 ms6.1%
Connection.waitpsycopg/connection.py:4950.69 ms6.1%
TestResolveLegacyAccountsAndPosts.test_match_existing_account_by_id_and_instance_when_url_differsconfs/tests.py:299 self.assertEqual(Account.objects.filter(account_id="pair-id", instance="mastodon.social").count(), 1)0.69 ms6.1%
QuerySet.countdjango/db/models/query.py:6770.69 ms6.1%
Query.get_countdjango/db/models/sql/query.py:6570.69 ms6.1%
Query.get_aggregationdjango/db/models/sql/query.py:6390.69 ms6.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16250.69 ms6.1%
CursorWrapper.executedjango/db/backends/utils.py:790.69 ms6.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.69 ms6.1%
CursorWrapper._executedjango/db/backends/utils.py:1050.69 ms6.1%
Cursor.executepsycopg/cursor.py:1130.69 ms6.1%
Connection.waitpsycopg/connection.py:4950.69 ms6.1%
Estimated from 15 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
confs/tests.py:277
existing = baker.make(
TestResolveLegacyAccountsAndPosts.test_match_existing_account_by_id_and_instance_when_url_differs
· Factories
|
3 ms |
|
confs/migrations/0033_remove_legacy_conference_tables.py:194
for account in accounts:
_index_accounts
· Database
|
0.69 ms |
|
confs/migrations/0033_remove_legacy_conference_tables.py:233
for account in _filter_by_pairs(lookup, "account_id", "instance", chunk):
_resolve_accounts
· Database
|
0.69 ms |
|
confs/tests.py:299
self.assertEqual(Account.objects.filter(account_id="pair-id", instance="mastodon.social").count(), 1)
TestResolveLegacyAccountsAndPosts.test_match_existing_account_by_id_and_instance_when_url_differs
· Database
|
0.69 ms |
Fixtures
Exact setup time| _dj_autoclear_mailbox function | 0.06 ms |
| _template_string_if_invalid_marker function | 0.04 ms |
| _django_db_marker function | 0.03 ms |
| _django_isolate_apps function | 0.03 ms |
| _django_set_urlconf function | 0.03 ms |
| _live_server_helper function | 0.03 ms |
| _django_clear_site_cache function | 0.03 ms |
| monkeypatch function | 0.02 ms |
Database
9 queries · 5 msNo repeated queries.
Biggest pieces of work
|
call test body
confs/tests.py:277
|
5 ms |
|
call _pre_setup
django/test/testcases.py:1167
|
3 ms |
|
call _post_teardown
django/test/testcases.py:1243
|
2 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 | |
|---|---|---|---|---|
| 8 hours ago | CI github-actions:test | passed | 11 ms | Profile |
| 8 hours ago | CI github-actions:test | passed | 30 ms | Profile |
| 8 hours ago | CI github-actions:test | passed | 15 ms | Profile |
| 13 hours ago | CI github-actions:test | passed | 8 ms | Profile |
| 14 hours ago | CI github-actions:test | passed | 6 ms | Run |