Tests / confs/tests.py
TestResolveLegacyAccountsAndPosts::test_dedupes_same_url_and_same_pair_in_one_batch
First seen 1 month, 1 week ago in 0c23747
CI
github-actions:test
13 runs
Average
15 ms
median 14 ms
max 28 ms
max 28 ms
Phases
Setup 2 ms
Call 13 ms
Teardown 0.51 ms
Categories
Database 12 ms
App code 0.17 ms
Other (Unsampled, Libraries, pytest) 3 ms
11 database queries per run
Needs 0 KB of memory (max 4 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
call16 ms95.8%
TestResolveLegacyAccountsAndPosts.test_dedupes_same_url_and_same_pair_in_one_batchconfs/tests.py:321 resolve = _legacy_migration()._resolve_accounts(9 ms51.6%
_resolve_accountsconfs/migrations/0033_remove_legacy_conference_tables.py:233 for account in _filter_by_pairs(lookup, "account_id", "instance", chunk):4 ms22.1%
QuerySet.__iter__django/db/models/query.py:4392 ms14.7%
QuerySet._fetch_alldjango/db/models/query.py:22622 ms14.7%
ModelIterable.__iter__django/db/models/query.py:1032 ms14.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16252 ms14.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms14.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms14.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms14.7%
Cursor.executepsycopg/cursor.py:1132 ms14.7%
Connection.waitpsycopg/connection.py:4952 ms14.7%
_filter_by_pairsconfs/migrations/0033_remove_legacy_conference_tables.py:207 return queryset.filter(query)1 ms7.4%
QuerySet.filterdjango/db/models/query.py:16761 ms7.4%
QuerySet._filter_or_excludedjango/db/models/query.py:16941 ms7.4%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:17041 ms7.4%
Query.add_qdjango/db/models/sql/query.py:16811 ms7.4%
Query._add_qdjango/db/models/sql/query.py:17131 ms7.4%
_resolve_accountsconfs/migrations/0033_remove_legacy_conference_tables.py:2271 ms7.4%
_index_accountsconfs/migrations/0033_remove_legacy_conference_tables.py:194 for account in accounts:1 ms7.4%
QuerySet.__iter__django/db/models/query.py:4391 ms7.4%
QuerySet._fetch_alldjango/db/models/query.py:22621 ms7.4%
ModelIterable.__iter__django/db/models/query.py:1031 ms7.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16251 ms7.4%
CursorWrapper.executedjango/db/backends/utils.py:791 ms7.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms7.4%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms7.4%
Cursor.executepsycopg/cursor.py:1131 ms7.4%
Connection.waitpsycopg/connection.py:4951 ms7.4%
_resolve_accountsconfs/migrations/0033_remove_legacy_conference_tables.py:250 account_model.objects.bulk_create(to_create, ignore_conflicts=True, batch_size=IN_CHUNK_SIZE)1 ms7.4%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms7.4%
QuerySet.bulk_createdjango/db/models/query.py:9001 ms7.4%
QuerySet._batched_insertdjango/db/models/query.py:21791 ms7.4%
QuerySet._insertdjango/db/models/query.py:21411 ms7.4%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19361 ms7.4%
CursorWrapper.executedjango/db/backends/utils.py:791 ms7.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms7.4%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms7.4%
Cursor.executepsycopg/cursor.py:1131 ms7.4%
Connection.waitpsycopg/connection.py:4951 ms7.4%
_resolve_accountsconfs/migrations/0033_remove_legacy_conference_tables.py:253 _index_accounts(by_url, by_pair, lookup.filter(url__in=chunk))1 ms7.4%
_index_accountsconfs/migrations/0033_remove_legacy_conference_tables.py:194 for account in accounts:1 ms7.4%
QuerySet.__iter__django/db/models/query.py:4391 ms7.4%
QuerySet._fetch_alldjango/db/models/query.py:22621 ms7.4%
ModelIterable.__iter__django/db/models/query.py:1031 ms7.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16251 ms7.4%
CursorWrapper.executedjango/db/backends/utils.py:791 ms7.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms7.4%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms7.4%
Cursor.executepsycopg/cursor.py:1131 ms7.4%
Connection.waitpsycopg/connection.py:4951 ms7.4%
_resolve_accountsconfs/migrations/0033_remove_legacy_conference_tables.py:256 for account in _filter_by_pairs(lookup, "account_id", "instance", chunk):1 ms7.4%
QuerySet.__iter__django/db/models/query.py:4391 ms7.4%
QuerySet._fetch_alldjango/db/models/query.py:22621 ms7.4%
ModelIterable.__iter__django/db/models/query.py:1031 ms7.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16251 ms7.4%
CursorWrapper.executedjango/db/backends/utils.py:791 ms7.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms7.4%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms7.4%
Cursor.executepsycopg/cursor.py:1131 ms7.4%
Connection.waitpsycopg/connection.py:4951 ms7.4%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms7.4%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms7.4%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms7.4%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()5 ms29.5%
TestCase._fixture_teardowndjango/test/testcases.py:14972 ms14.7%
TestCase._should_check_constraintsdjango/test/testcases.py:15062 ms14.7%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:5042 ms14.7%
Cursor.executepsycopg/cursor.py:1132 ms14.7%
Connection.waitpsycopg/connection.py:4952 ms14.7%
TestCase._fixture_teardowndjango/test/testcases.py:14982 ms14.7%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4951 ms7.4%
CursorWrapper.executedjango/db/backends/utils.py:791 ms7.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms7.4%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms7.4%
Cursor.executepsycopg/cursor.py:1131 ms7.4%
Connection.waitpsycopg/connection.py:4951 ms7.4%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4961 ms7.4%
CursorWrapper.executedjango/db/backends/utils.py:791 ms7.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms7.4%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms7.4%
Cursor.executepsycopg/cursor.py:1131 ms7.4%
Connection.waitpsycopg/connection.py:4951 ms7.4%
TransactionTestCase._pre_setupdjango/test/testcases.py:1167 cls._fixture_setup()1 ms7.4%
TestCase._fixture_setupdjango/test/testcases.py:14811 ms7.4%
TestCase._enter_atomicsdjango/test/testcases.py:13991 ms7.4%
Atomic.__enter__django/db/transaction.py:2231 ms7.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:261 ms7.4%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4001 ms7.4%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3671 ms7.4%
CursorWrapper.executedjango/db/backends/utils.py:791 ms7.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms7.4%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms7.4%
Cursor.executepsycopg/cursor.py:1131 ms7.4%
Connection.waitpsycopg/connection.py:4951 ms7.4%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms7.4%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms7.4%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms7.4%
TestResolveLegacyAccountsAndPosts.test_dedupes_same_url_and_same_pair_in_one_batchconfs/tests.py:349 self.assertEqual(Account.objects.filter(username="shared").count(), 1)1 ms7.4%
QuerySet.countdjango/db/models/query.py:6771 ms7.4%
Query.get_countdjango/db/models/sql/query.py:6571 ms7.4%
Query.get_aggregationdjango/db/models/sql/query.py:6391 ms7.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16251 ms7.4%
CursorWrapper.executedjango/db/backends/utils.py:791 ms7.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms7.4%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms7.4%
Cursor.executepsycopg/cursor.py:1131 ms7.4%
Connection.waitpsycopg/connection.py:4951 ms7.4%
Estimated from 13 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
confs/migrations/0033_remove_legacy_conference_tables.py:233
for account in _filter_by_pairs(lookup, "account_id", "instance", chunk):
_resolve_accounts
· Database
|
2 ms |
|
confs/migrations/0033_remove_legacy_conference_tables.py:194
for account in accounts:
_index_accounts
· Database
|
2 ms |
|
confs/migrations/0033_remove_legacy_conference_tables.py:207
return queryset.filter(query)
_filter_by_pairs
· Database
|
1 ms |
|
confs/migrations/0033_remove_legacy_conference_tables.py:250
account_model.objects.bulk_create(to_create, ignore_conflicts=True, batch_size=IN_CHUNK_SIZE)
_resolve_accounts
· Database
|
1 ms |
|
confs/migrations/0033_remove_legacy_conference_tables.py:256
for account in _filter_by_pairs(lookup, "account_id", "instance", chunk):
_resolve_accounts
· Database
|
1 ms |
|
confs/tests.py:349
self.assertEqual(Account.objects.filter(username="shared").count(), 1)
TestResolveLegacyAccountsAndPosts.test_dedupes_same_url_and_same_pair_in_one_batch
· Database
|
1 ms |
Fixtures
Exact setup time| _dj_autoclear_mailbox function | 0.03 ms |
| _django_db_marker function | 0.02 ms |
| _template_string_if_invalid_marker function | 0.02 ms |
| _django_isolate_apps function | 0.02 ms |
| _django_set_urlconf function | 0.02 ms |
| _live_server_helper function | 0.02 ms |
| _django_clear_site_cache function | 0.02 ms |
| monkeypatch function | 0.01 ms |
Database
11 queries · 11 msNo repeated queries.
Biggest pieces of work
|
call test body
confs/tests.py:321
|
10 ms |
|
call _post_teardown
django/test/testcases.py:1243
|
5 ms |
|
call _pre_setup
django/test/testcases.py:1167
|
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 | 17 ms | Profile |
| 2 weeks, 5 days ago | CI github-actions:test | passed | 11 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 19 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 6 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 14 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 14 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 9 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 19 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 16 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 14 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 28 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 24 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 11 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 8 ms | Run |